Change default oauth_url scopes to include application.commands

This commit is contained in:
Rapptz
2022-03-07 18:33:52 -05:00
parent ba2763a4a1
commit 8213603822
2 changed files with 3 additions and 2 deletions

View File

@ -295,7 +295,7 @@ def oauth_url(
redirect_uri: :class:`str`
An optional valid redirect URI.
scopes: Iterable[:class:`str`]
An optional valid list of scopes. Defaults to ``('bot',)``.
An optional valid list of scopes. Defaults to ``('bot', 'application.commands')``.
.. versionadded:: 1.7
disable_guild_select: :class:`bool`
@ -309,7 +309,7 @@ def oauth_url(
The OAuth2 URL for inviting the bot into guilds.
"""
url = f'https://discord.com/oauth2/authorize?client_id={client_id}'
url += '&scope=' + '+'.join(scopes or ('bot',))
url += '&scope=' + '+'.join(scopes or ('bot', 'application.commands'))
if permissions is not MISSING:
url += f'&permissions={permissions.value}'
if guild is not MISSING: