mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-12-05 17:02:32 -05:00
[3.4] Fix 'Red._app_info' attribute error (#5517)
This commit is contained in:
@@ -1327,12 +1327,13 @@ class RedBase(
|
|||||||
str
|
str
|
||||||
Invite URL.
|
Invite URL.
|
||||||
"""
|
"""
|
||||||
|
app_info = await self.application_info()
|
||||||
data = await self._config.all()
|
data = await self._config.all()
|
||||||
commands_scope = data["invite_commands_scope"]
|
commands_scope = data["invite_commands_scope"]
|
||||||
scopes = ("bot", "applications.commands") if commands_scope else None
|
scopes = ("bot", "applications.commands") if commands_scope else None
|
||||||
perms_int = data["invite_perm"]
|
perms_int = data["invite_perm"]
|
||||||
permissions = discord.Permissions(perms_int)
|
permissions = discord.Permissions(perms_int)
|
||||||
return discord.utils.oauth_url(self._app_info.id, permissions, scopes=scopes)
|
return discord.utils.oauth_url(app_info.id, permissions, scopes=scopes)
|
||||||
|
|
||||||
async def is_invite_url_public(self) -> bool:
|
async def is_invite_url_public(self) -> bool:
|
||||||
"""
|
"""
|
||||||
|
|||||||
Reference in New Issue
Block a user