›
2
Permissions
Configure bot permissions
Choose what {clientLabel} can do in your community. Uncheck any permissions you don't want to grant.
{requestedPermissionKeys.map((perm) => {
const option = botPermissionOptions.find((opt) => opt.id === perm);
if (!option) return null;
return (
togglePermission(perm)}
onKeyDown={(e) => e.key === 'Enter' && togglePermission(perm)}
role="button"
tabIndex={0}
>
togglePermission(perm)}
size="small"
>
{option.label}
);
})}
{requestsAdmin && (
<>
This bot is requesting the Administrator permission. We do not recommend granting this to production
apps unless you fully trust the developer. Consider asking them to request a reduced set of permissions.
Close this page if you are unsure.
>
)}
{permissionsAdjusted && (
<>
Removing permissions could limit the bot's features.
>
)}
{redirectHostname && (
You will be taken to{' '}
{redirectHostname}
{' '}
after authorizing.
)}
);
}
return (
{needsPermissionsStep && (
1
Scopes
›
2
Permissions
)}
Authorization request
{clientLabel} wants to connect
{publicApp?.description ? (
publicApp.description
) : (
Review what this app is asking for before you continue.
)}
{redirectHostname ? (
Will send you back to {redirectHostname}
) : (
botInviteWithoutRedirect && {t`Bot invite (no external redirect)`}
)}
{authParams.guildId && (
Target community: {authParams.guildId}
)}
{hasBotScope && {t`Bot scope requested`}}
{currentUser && (
<>
Signed in as
{currentUser.displayName || currentUser.username}
{currentUser.username}#{currentUser.discriminator}
>
)}
Requested scopes
Turn off anything you're not comfortable with. Some features may stop working.
{scopes.length === 0 ? (
No specific scopes requested.
) : (
scopes.map((scope) => {
const isLocked = scope === 'bot';
return (
toggleScope(scope)}
disabled={isLocked}
compact
label={
{scope}
{isLocked && {t`Required`}}
}
description={{getScopeDescription(scope)}}
/>
);
})
)}
{scopesAdjusted && (
Turning off scopes may prevent the app from working correctly.
)}
{hasBotScope &&
}
{hasBotScope && (
Add bot to a community
Select a community where you have Manage Community{' '}
permissions.
)}
{needsPermissionsStep && (
<>
You'll configure which permissions the bot receives on the next screen.
>
)}
{needsPermissionsStep ? (
) : (
)}
{redirectHostname && !needsPermissionsStep && (
You will be taken to{' '}
{redirectHostname}
{' '}
after authorizing.
)}
);
});
export default OAuthAuthorizePage;