CreateOAuth2LinkOptions
Documentation / @discordeno/bot / CreateOAuth2LinkOptions
Interface: CreateOAuth2LinkOptions
Defined in: packages/utils/dist/types/oauth2.d.ts:3
Properties
clientId
clientId:
BigString
Defined in: packages/utils/dist/types/oauth2.d.ts:12
The id of the application
disableGuildSelect?
optional
disableGuildSelect:boolean
Defined in: packages/utils/dist/types/oauth2.d.ts:56
Disallows the user from changing the guild dropdown if set to true
Remarks
Should be defined only in a bot authorization flow, with advanced bot authorization or with the webhook.incoming
scope
guildId?
optional
guildId:BigString
Defined in: packages/utils/dist/types/oauth2.d.ts:49
Pre-fills the dropdown picker with a guild for the user
Remarks
Should be defined only in a bot authorization flow or with advanced bot authorization or with the webhook.incoming
scope
integrationType?
optional
integrationType:DiscordApplicationIntegrationType
Defined in: packages/utils/dist/types/oauth2.d.ts:67
Specifies the installation context for the authorization
Remarks
Should be defined only when scope includes OAuth2Scope.ApplicationsCommands.
When set to GuildInstall (0) the application will be authorized for installation to a server, and when set to UserInstall (1) the application will be authorized for installation to a user.
The application must be configured in the Developer Portal to support the provided integrationType
.
permissions?
optional
permissions:BigString
| ("CREATE_INSTANT_INVITE"
|"KICK_MEMBERS"
|"BAN_MEMBERS"
|"ADMINISTRATOR"
|"MANAGE_CHANNELS"
|"MANAGE_GUILD"
|"ADD_REACTIONS"
|"VIEW_AUDIT_LOG"
|"PRIORITY_SPEAKER"
|"STREAM"
|"VIEW_CHANNEL"
|"SEND_MESSAGES"
|"SEND_TTS_MESSAGES"
|"MANAGE_MESSAGES"
|"EMBED_LINKS"
|"ATTACH_FILES"
|"READ_MESSAGE_HISTORY"
|"MENTION_EVERYONE"
|"USE_EXTERNAL_EMOJIS"
|"VIEW_GUILD_INSIGHTS"
|"CONNECT"
|"SPEAK"
|"MUTE_MEMBERS"
|"DEAFEN_MEMBERS"
|"MOVE_MEMBERS"
|"USE_VAD"
|"CHANGE_NICKNAME"
|"MANAGE_NICKNAMES"
|"MANAGE_ROLES"
|"MANAGE_WEBHOOKS"
|"MANAGE_GUILD_EXPRESSIONS"
|"USE_SLASH_COMMANDS"
|"REQUEST_TO_SPEAK"
|"MANAGE_EVENTS"
|"MANAGE_THREADS"
|"CREATE_PUBLIC_THREADS"
|"CREATE_PRIVATE_THREADS"
|"USE_EXTERNAL_STICKERS"
|"SEND_MESSAGES_IN_THREADS"
|"USE_EMBEDDED_ACTIVITIES"
|"MODERATE_MEMBERS"
|"VIEW_CREATOR_MONETIZATION_ANALYTICS"
|"USE_SOUNDBOARD"
|"CREATE_GUILD_EXPRESSIONS"
|"CREATE_EVENTS"
|"USE_EXTERNAL_SOUNDS"
|"SEND_VOICE_MESSAGES"
|"SEND_POLLS"
|"USE_EXTERNAL_APPS"
)[]
Defined in: packages/utils/dist/types/oauth2.d.ts:42
The permissions of the invited bot
Remarks
Should be defined only in a bot authorization flow or with advanced bot authorization
prompt?
optional
prompt:"consent"
|"none"
Defined in: packages/utils/dist/types/oauth2.d.ts:35
The type of prompt to give to the user
Remarks
If set to none
, it will skip the authorization screen and redirect them back to your redirect URI without requesting their authorization.
For passthrough scopes, like bot and webhook.incoming, authorization is always required.
redirectUri?
optional
redirectUri:string
Defined in: packages/utils/dist/types/oauth2.d.ts:27
The redirect uri for after the authentication
Remarks
Should be defined only if using either OAuth2 authorization, implicit or not, or advanced bot authorization
responseType?
optional
responseType:"code"
|"token"
Defined in: packages/utils/dist/types/oauth2.d.ts:10
The type of response
Remarks
Should be defined only if using either OAuth2 authorization, implicit or not, or advanced bot authorization
scope
scope:
OAuth2Scope
[]
Defined in: packages/utils/dist/types/oauth2.d.ts:14
The scopes for the application
state?
optional
state:string
Defined in: packages/utils/dist/types/oauth2.d.ts:20
The optional state for security
See
https://discord.com/developers/docs/topics/oauth2#state-and-security