View Code? Open in Web Editor
NEW
A Discord Bot that interacts with the Clash Royale API to provide statistics
Home Page: https://discord.com/api/oauth2/authorize?client_id=903267050775007283&scope=applications.commands
License: MIT License
TypeScript 99.95%
Shell 0.05%
ms-royale's People
Contributors
Stargazers
Watchers
ms-royale's Issues
Enable support for other locales.
Not all the locales need to be supported.
|
/** |
|
* The invite URL for the bot. |
|
*/ |
|
inviteUrl: () => |
|
`https://discord.com/api/oauth2/authorize?client_id=${process.env |
|
.DISCORD_CLIENT_ID!}&scope=${ |
|
// TODO: This should be replaced with the discord application scopes provided by the API when they are ready. |
|
// See https://github.com/discord/discord-api-docs/pull/4112 |
|
[OAuth2Scopes.ApplicationsCommands].join("%20") |
|
}` as const, |
|
// TODO: Remove this command once the "Add to server" button is fully released by Discord |
|
export const command: CommandOptions = { |
|
data: new SlashCommandBuilder() |
|
.setName("invite") |
|
.setDescription("Aggiungi i comandi del bot nel tuo server!"), |
|
async run(interaction) { |
|
return interaction.reply({ |
|
content: |
|
"Clicca il pulsante qui sotto per aggiungere i comandi del bot nel tuo server!", |
|
components: [ |
|
new MessageActionRow().addComponents( |
|
new MessageButton() |
|
.setEmoji(Emojis.Robot) |
|
.setLabel("Aggiungi al server") |
|
.setStyle(MessageButtonStyles.LINK) |
|
.setURL(Constants.inviteUrl()) |
|
), |
|
], |
|
}); |
|
}, |
|
}; |