Skip to content

Commit

Permalink
chore: Remove unused code and update dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
Fyphen1223 authored Jun 14, 2024
1 parent ec184aa commit 0c5ff72
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 29 deletions.
6 changes: 1 addition & 5 deletions buttons/stop.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
const {
createMessageEmbed,
createMusicEmbed,
createButton,
} = require('../util/embed.js');
const { createMessageEmbed } = require('../util/embed.js');
const { getLocale } = require('../lang/lang.js');
const guilds = require('../data/guilds.json');

Expand Down
7 changes: 0 additions & 7 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,19 +49,12 @@ const targz = require('targz');

const client = new discord.Client({
intents: [
discord.GatewayIntentBits.DirectMessageReactions,
discord.GatewayIntentBits.DirectMessageTyping,
discord.GatewayIntentBits.DirectMessages,
discord.GatewayIntentBits.GuildBans,
discord.GatewayIntentBits.GuildEmojisAndStickers,
discord.GatewayIntentBits.GuildIntegrations,
discord.GatewayIntentBits.GuildInvites,
discord.GatewayIntentBits.GuildMembers,
discord.GatewayIntentBits.GuildMessageReactions,
discord.GatewayIntentBits.GuildMessageTyping,
discord.GatewayIntentBits.GuildMessages,
discord.GatewayIntentBits.GuildPresences,
discord.GatewayIntentBits.GuildScheduledEvents,
discord.GatewayIntentBits.GuildVoiceStates,
discord.GatewayIntentBits.GuildWebhooks,
discord.GatewayIntentBits.Guilds,
Expand Down
25 changes: 8 additions & 17 deletions util/embed.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,53 +45,44 @@ function createButton(style) {
const main = new ActionRowBuilder().addComponents(
new ButtonBuilder()
.setCustomId(style === 'pause' ? 'resume' : 'pause')
.setLabel(style === 'pause' ? 'Resume' : 'Pause')
//.setLabel(style === 'pause' ? 'Resume' : 'Pause')
.setEmoji(style === 'pause' ? '1117306258077257791' : '1117306256781230191')
.setStyle(ButtonStyle.Secondary),
new ButtonBuilder()
.setCustomId('stop')
.setLabel('Stop')
//.setLabel('Stop')
.setEmoji('1100927733116186694')
.setStyle(ButtonStyle.Danger),
new ButtonBuilder()
.setCustomId('back')
.setLabel('Back')
.setEmoji('1117303043743039599')
.setStyle(ButtonStyle.Secondary),
new ButtonBuilder()
.setCustomId('skip')
.setLabel('Skip')
.setEmoji('1117303289365659648')
.setStyle(ButtonStyle.Secondary),
new ButtonBuilder()
.setCustomId('addR')
.setLabel('Add Relate')
.setCustomId('queue')
.setLabel('Queue')
.setEmoji('1117304805237465138')
.setStyle(ButtonStyle.Secondary)
);

const other = new ActionRowBuilder().addComponents(
new ButtonBuilder()
.setCustomId('volumeDown')
.setLabel('Down')
.setLabel('-')
.setEmoji('1117303628349313035')
.setStyle(ButtonStyle.Secondary),
new ButtonBuilder()
.setCustomId('volumeUp')
.setLabel('Up')
.setLabel('+')
.setEmoji('1117304554216767558')
.setStyle(ButtonStyle.Secondary),
new ButtonBuilder()
.setCustomId('lyric')
.setLabel('Lyric')
.setStyle(ButtonStyle.Secondary),
new ButtonBuilder()
.setCustomId('queue')
.setLabel('Queue')
.setEmoji('1117304805237465138')
.setStyle(ButtonStyle.Secondary)
);

const seek = new ActionRowBuilder().addComponents(
new ButtonBuilder()
.setCustomId('30m')
.setLabel('-30s')
Expand All @@ -101,7 +92,7 @@ function createButton(style) {
.setLabel('+30s')
.setStyle(ButtonStyle.Secondary)
);
return [main, other, seek];
return [main, other];
}

module.exports = { createMessageEmbed, createMusicEmbed, createButton };

0 comments on commit 0c5ff72

Please sign in to comment.