diff --git a/README.md b/README.md index f3c7956ba..fd552a030 100644 --- a/README.md +++ b/README.md @@ -150,6 +150,7 @@ LAVALINK_URL="lava.moebot.xyz:443" # Your lavalink url LAVALINK_AUTH="youshallnotpass" # Your lavalink password LAVALINK_NAME="Blacky" # Your lavalink name LAVALINK_SECURE= "true" # true for secure lavalink +BOT_ACTIVITY_TYPE=0 # Activity type is a number from 0 to 5 see more here https://discord.com/developers/docs/topics/gateway-events#activity-object-activity-types ``` diff --git a/src/config.ts b/src/config.ts index cfc85f6ef..76f11c990 100644 --- a/src/config.ts +++ b/src/config.ts @@ -16,6 +16,7 @@ export default { maxPlaylistSize: parseInt(process.env.MAX_PLAYLIST_SIZE) || 100, botStatus: process.env.BOT_STATUS || 'online', // online, idle, dnd, invisible botActivity: process.env.BOT_ACTIVITY || 'Lavamusic', // set the bot activity + botActivityType: parseInt(process.env.BOT_ACTIVITY_TYPE || '2'), // 0 to 5 get more info - https://discord.com/developers/docs/topics/gateway-events#activity-object-activity-types maxQueueSize: parseInt(process.env.MAX_QUEUE_SIZE) || 100, owners: process.env.OWNERS?.split(','), database: process.env.DATABASE_URL, diff --git a/src/events/client/Ready.ts b/src/events/client/Ready.ts index 38198310f..1b8674a70 100644 --- a/src/events/client/Ready.ts +++ b/src/events/client/Ready.ts @@ -1,6 +1,5 @@ import config from '../../config.js'; import { Event, Lavamusic } from '../../structures/index.js'; -import { ActivityType } from 'discord.js'; export default class Ready extends Event { constructor(client: Lavamusic, file: string) { super(client, file, { @@ -14,7 +13,7 @@ export default class Ready extends Event { activities: [ { name: config.botActivity, - type: ActivityType.Listening, + type: config.botActivityType, }, ], status: config.botStatus as any, diff --git a/src/events/player/TrackStart.ts b/src/events/player/TrackStart.ts index 03a2abf27..0051b1dab 100644 --- a/src/events/player/TrackStart.ts +++ b/src/events/player/TrackStart.ts @@ -19,16 +19,19 @@ export default class TrackStart extends Event { function buttonBuilder() { const previousButton = new ButtonBuilder() .setCustomId('previous') - .setLabel(`Previous`) + .setEmoji('⏪') .setStyle(ButtonStyle.Secondary) .setDisabled(dispatcher.previous ? false : true); const resumeButton = new ButtonBuilder() .setCustomId('resume') - .setLabel(player.paused ? `Resume` : `Pause`) + .setEmoji(player.paused ? '▶️' : '⏸️') .setStyle(player.paused ? ButtonStyle.Success : ButtonStyle.Secondary); - const stopButton = new ButtonBuilder().setCustomId('stop').setLabel(`Stop`).setStyle(ButtonStyle.Danger); - const skipButton = new ButtonBuilder().setCustomId('skip').setLabel(`Skip`).setStyle(ButtonStyle.Secondary); - const loopButton = new ButtonBuilder().setCustomId('loop').setLabel(`Loop`).setStyle(ButtonStyle.Secondary); + const stopButton = new ButtonBuilder().setCustomId('stop').setEmoji('⏹️').setStyle(ButtonStyle.Danger); + const skipButton = new ButtonBuilder().setCustomId('skip').setEmoji('⏩').setStyle(ButtonStyle.Secondary); + const loopButton = new ButtonBuilder() + .setCustomId('loop') + .setEmoji(dispatcher.loop === 'repeat' ? '🔂' : '🔁') + .setStyle(dispatcher.loop !== 'off' ? ButtonStyle.Success : ButtonStyle.Secondary); return new ActionRowBuilder().addComponents( previousButton,