mirror of
https://github.com/darksaid98/cadence-discord-bot.git
synced 2026-12-04 14:38:49 +00:00
Merge branch 'main' into main
This commit is contained in:
2 files changed
+44
-14
No files matched your search
@@ -22,10 +22,12 @@
|
|||||||
|
|
||||||
## Core Features 🌟
|
## Core Features 🌟
|
||||||
Cadence offers an enriching audio experience on Discord with features such as:
|
Cadence offers an enriching audio experience on Discord with features such as:
|
||||||
- High-quality music playback from [many supported sources](https://discord-player.js.org/guide/extractors/stream-sources) thanks to [discord-player](https://github.com/androz2091/discord-player)
|
- High-quality music playback from [many supported sources](https://discord-player.js.org/guide/extractors/stream-sources) thanks to [discord-player](https://github.com/androz2091/discord-player).
|
||||||
- Implements latest Discord features such as slash commands, autocompleting search queries and more
|
- Slash commands, autocompleting search queries, select menus, buttons and more interactive features!
|
||||||
- Open-source codebase and community based development, open to feedback and improvements
|
- Full queue management system to add, remove, skip or move tracks, view queue and history.
|
||||||
- No locked functionality, no premium tier, no ads; everything's free, always
|
- Audio filters, shuffle mode, repeat track, queue or autoplay similar tracks!
|
||||||
|
- Open-source codebase and community based development, open to feedback and improvements.
|
||||||
|
- No locked functionality, no premium tier, no ads; everything's free, always.
|
||||||
|
|
||||||
<br>
|
<br>
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,11 @@
|
|||||||
import {
|
import {
|
||||||
|
APIActionRowComponent,
|
||||||
|
APIButtonComponent,
|
||||||
|
APIMessageActionRowComponent,
|
||||||
|
ButtonBuilder,
|
||||||
|
ButtonStyle,
|
||||||
Collection,
|
Collection,
|
||||||
|
ComponentType,
|
||||||
EmbedBuilder,
|
EmbedBuilder,
|
||||||
SlashCommandBuilder,
|
SlashCommandBuilder,
|
||||||
SlashCommandNumberOption,
|
SlashCommandNumberOption,
|
||||||
@@ -22,11 +28,34 @@ class HelpCommand extends BaseSlashCommandInteraction {
|
|||||||
const logger = this.getLogger(this.name, executionId, interaction);
|
const logger = this.getLogger(this.name, executionId, interaction);
|
||||||
const translator = useServerTranslator(interaction);
|
const translator = useServerTranslator(interaction);
|
||||||
|
|
||||||
const [commandEmbedString, supportServerString, addBotString] = await Promise.all([
|
const commandEmbedString = await this.getCommandEmbedString(client!);
|
||||||
this.getCommandEmbedString(client!),
|
|
||||||
this.getSupportServerString(translator),
|
const components: APIMessageActionRowComponent[] = [];
|
||||||
this.getAddBotString(translator)
|
|
||||||
]);
|
if (this.botOptions.serverInviteUrl && this.botOptions.serverInviteUrl !== '') {
|
||||||
|
const supportServerButton: APIButtonComponent = new ButtonBuilder()
|
||||||
|
.setURL(this.botOptions.serverInviteUrl)
|
||||||
|
.setStyle(ButtonStyle.Link)
|
||||||
|
.setEmoji(this.embedOptions.icons.support)
|
||||||
|
.setLabel('Support server')
|
||||||
|
.toJSON();
|
||||||
|
components.push(supportServerButton);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (this.botOptions.botInviteUrl && this.botOptions.botInviteUrl !== '') {
|
||||||
|
const addBotButton: APIButtonComponent = new ButtonBuilder()
|
||||||
|
.setURL(this.botOptions.botInviteUrl)
|
||||||
|
.setStyle(ButtonStyle.Link)
|
||||||
|
.setEmoji(this.embedOptions.icons.bot)
|
||||||
|
.setLabel('Add bot')
|
||||||
|
.toJSON();
|
||||||
|
components.push(addBotButton);
|
||||||
|
}
|
||||||
|
|
||||||
|
const embedActionRow: APIActionRowComponent<APIMessageActionRowComponent> = {
|
||||||
|
type: ComponentType.ActionRow,
|
||||||
|
components
|
||||||
|
};
|
||||||
|
|
||||||
logger.debug('Responding with info embed.');
|
logger.debug('Responding with info embed.');
|
||||||
return await interaction.editReply({
|
return await interaction.editReply({
|
||||||
@@ -37,12 +66,11 @@ class HelpCommand extends BaseSlashCommandInteraction {
|
|||||||
icon: this.embedOptions.icons.rule
|
icon: this.embedOptions.icons.rule
|
||||||
}) +
|
}) +
|
||||||
'\n' +
|
'\n' +
|
||||||
commandEmbedString +
|
commandEmbedString
|
||||||
supportServerString +
|
|
||||||
addBotString
|
|
||||||
)
|
)
|
||||||
.setColor(this.embedOptions.colors.info)
|
.setColor(this.embedOptions.colors.info)
|
||||||
]
|
],
|
||||||
|
components: components.length > 0 ? [embedActionRow] : []
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -64,7 +92,7 @@ class HelpCommand extends BaseSlashCommandInteraction {
|
|||||||
return this.getCommandString(command);
|
return this.getCommandString(command);
|
||||||
});
|
});
|
||||||
|
|
||||||
const commandString = commandStringList.join('\n') + '\n';
|
const commandString = commandStringList.join('\n');
|
||||||
return commandString;
|
return commandString;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user