Skip to content

Commit 5b90598

Browse files
committed
Update 5.3.0
## Update List - [x] Add Context Message Menu! - [x] Add More Commands! - [x] Fixed Bug!
1 parent 0c7bcb1 commit 5b90598

File tree

27 files changed

+446
-125
lines changed

27 files changed

+446
-125
lines changed

README.md

Lines changed: 54 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
## 📑 Short Feature
22
- [x] Music
33
- [x] Filters
4-
- [x] AutoComplete (Play Command!)
4+
- [x] AutoComplete (Search!)
55
- [x] Song Request Channel
66
- [x] Message Button
77
- [x] Database (Json)
@@ -46,46 +46,62 @@ EMBED_COLOR=#000001
4646

4747
> Note: The default prefix is '/'
4848
49+
💬 **Context Menu**
50+
- Play (Right-Click & Apps > Context | Play)
51+
- Skip (Right-Click & Apps > Context | Skip)
52+
- Stop (Right-Click & Apps > Context | Stop)
53+
- Shuffle (Right-Click & Apps > Context | Shuffle)
54+
- Loop (Right-Click & Apps > Context | Loop)
55+
4956
🎶 **Music Commands!**
50-
- Play (/play)
51-
- Autoplay (/autoplay)
52-
- Lyrics (/lyrics)
53-
- Playskip (/playskip)
54-
- Replay (/replay)
55-
- Previous (/previous)
56-
- Nowplaying (/nowplaying)
57-
- Queue (/queue)
58-
- Loop (/loop)
59-
- Loopqueue (/loopqueue)
60-
- Shuffle (/shuffle)
61-
- Volume control (/volume)
62-
- Pause (/pause)
63-
- Resume (/resume)
64-
- Skip (/skip)
65-
- Skipto (/skipto)
66-
- Join (/join)
67-
- Leave (/leave)
57+
- Play (/play [song/url])
58+
- Nowplaying (/music nowplaying)
59+
- Queue (/music queue [page])
60+
- Repeat (/music loop)
61+
- Loopqueue (/music loopqueue)
62+
- Shuffle (/music shuffle)
63+
- Volume control (/music volume [10 - 100])
64+
- Pause (/music pause)
65+
- Resume (/music resume)
66+
- Skip (/music skip)
67+
- Skipto (/music skipto [position])
68+
- ClearQueue (/music clearqueue)
69+
- Join (/music join)
70+
- Leave (/music leave)
71+
- Forward (/music forward [second])
72+
- Seek (/music seek [second])
73+
- Rewind (/music rewind [second])
74+
- Replay (/music replay)
75+
- 247 (/music 247)
76+
- Previous (/music previous)
77+
- Autoplay (/music autoplay)
78+
- Move (/music move [song] [position])
79+
- Remove (/music remove [song])
80+
- PlaySkip (/music playskip [song/url])
81+
- PlayTop (/music playtop [song/url])
6882

6983
**Filter Commands!**
70-
- Vaporwave (/vaporwave)
71-
- Earwax (/earwax)
72-
- Nightcore (/nightcore)
73-
- 3d (/3d)
74-
- Echo (/echo)
75-
- Flanger (/flanger)
76-
- Gate (/gate)
77-
- Haas (/hass)
78-
- Karaoke (/karaoke)
79-
- Mcopand (/mcopand)
80-
- Phaser (/phaser)
81-
- Reverse (/reverse)
82-
- Surround (/surround)
83-
- Tremolo (/tremolo)
84-
- Bassboost (/bassboost)
85-
- Reset (/reset)
84+
- Vaporwave (/filter vaporwave)
85+
- Earwax (/filter earwax)
86+
- Nightcore (/filter nightcore)
87+
- 3d (/filter 3d)
88+
- Echo (/filter echo)
89+
- Flanger (/filter flanger)
90+
- Gate (/filter gate)
91+
- Haas (/filter hass)
92+
- Karaoke (/filter karaoke)
93+
- Mcopand (/filter mcopand)
94+
- Phaser (/filter phaser)
95+
- Reverse (/filter reverse)
96+
- Surround (/filter surround)
97+
- Tremolo (/filter tremolo)
98+
- Bassboost (/filter bassboost)
99+
- Earrape (/filter earrape)
100+
- Custom (/filter custom [args])
101+
- Reset (/filter reset)
86102

87103
📑 **Utilities Commands!**
88104
- Help (/help)
89-
- Invite (/invite)
90-
- Restart (/restart)
91-
- Setup (/setup)
105+
- Invite (/utilities invite)
106+
- Restart (/utilities restart)
107+
- Setup (/utilities setup)

commands/Context/Leave.js

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
const { EmbedBuilder, ApplicationCommandType } = require('discord.js');
2+
3+
module.exports = {
4+
name: ["Context | Stop"],
5+
type: ApplicationCommandType.Message,
6+
category: "Context",
7+
run: async (client, interaction) => {
8+
await interaction.deferReply({ ephemeral: false });
9+
10+
const queue = client.distube.getQueue(interaction);
11+
if (!queue) return interaction.editReply(`There is nothing in the queue right now!`);
12+
const { channel } = interaction.member.voice;
13+
if (!channel || interaction.member.voice.channel !== interaction.guild.members.me.voice.channel) return interaction.editReply("You need to be in a same/voice channel.")
14+
15+
await client.distube.voices.leave(interaction.guild);
16+
17+
const embed = new EmbedBuilder()
18+
.setDescription(`\`🚫\` | **Left:** | \`${channel.name}\``)
19+
.setColor(client.color)
20+
21+
interaction.editReply({ embeds : [embed] });
22+
}
23+
}

commands/Context/Loop.js

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
const { EmbedBuilder, ApplicationCommandType } = require('discord.js');
2+
3+
module.exports = {
4+
name: ["Context | Loop"],
5+
type: ApplicationCommandType.Message,
6+
category: "Context",
7+
run: async (client, interaction) => {
8+
await interaction.deferReply({ ephemeral: false });
9+
10+
const queue = client.distube.getQueue(interaction);
11+
if (!queue) return interaction.editReply(`There is nothing in the queue right now!`);
12+
const { channel } = interaction.member.voice;
13+
if (!channel || interaction.member.voice.channel !== interaction.guild.members.me.voice.channel) return interaction.editReply("You need to be in a same/voice channel.")
14+
15+
if (queue.repeatMode === 2) {
16+
await client.distube.setRepeatMode(interaction, 0);
17+
18+
const embed = new EmbedBuilder()
19+
.setColor(client.color)
20+
.setDescription(`\`🔁\` | **Song is unloop:** \`All\``)
21+
22+
interaction.editReply({ embeds: [embed] });
23+
} else {
24+
await client.distube.setRepeatMode(interaction, 2);
25+
26+
const embed = new EmbedBuilder()
27+
.setColor(client.color)
28+
.setDescription(`\`🔁\` | **Song is loop:** \`All\``)
29+
30+
interaction.editReply({ embeds: [embed] });
31+
}
32+
}
33+
};

commands/Context/Play.js

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
const { PermissionsBitField, ApplicationCommandType } = require('discord.js');
2+
const { Database } = require("st.db");
3+
4+
const GSetup = new Database("./settings/models/setup.json", { databaseInObject: true });
5+
6+
module.exports = {
7+
name: ["Context | Play"],
8+
type: ApplicationCommandType.Message,
9+
category: "Context",
10+
run: async (client, interaction) => {
11+
await interaction.deferReply({ ephemeral: false });
12+
13+
const string = (interaction.channel.messages.cache.get(interaction.targetId).content ?? await interaction.channel.messages.fetch(interaction.targetId));
14+
if (!string.startsWith('https')) return interaction.editReply(`Message must be link.`);
15+
16+
const db = await GSetup.get(interaction.guild.id);
17+
if (db.setup_enable === true) return interaction.editReply("Command is disable already have song request channel!");
18+
19+
await interaction.editReply(`🔍 **Searching...** \`${string}\``);
20+
21+
const message = await interaction.fetchReply();
22+
await client.createPlay(interaction, message.id);
23+
24+
const { channel } = interaction.member.voice;
25+
if (!channel) return interaction.editReply("You need to be in voice channel.")
26+
if (!channel.permissionsFor(interaction.guild.members.me).has(PermissionsBitField.Flags.Connect)) return interaction.editReply(`I don't have perm \`CONNECT\` in ${channel.name} to join voice!`);
27+
if (!channel.permissionsFor(interaction.guild.members.me).has(PermissionsBitField.Flags.Speak)) return interaction.editReply(`I don't have perm \`SPEAK\` in ${channel.name} to join voice!`);
28+
29+
try {
30+
const options = {
31+
member: interaction.member,
32+
textChannel: interaction.channel,
33+
interaction,
34+
}
35+
36+
await client.distube.play(interaction.member.voice.channel, string, options);
37+
} catch (e) {
38+
//
39+
}
40+
}
41+
}

commands/Context/Shuffle.js

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
const { EmbedBuilder, ApplicationCommandType } = require('discord.js');
2+
3+
module.exports = {
4+
name: ["Context | Shuffle"],
5+
type: ApplicationCommandType.Message,
6+
category: "Context",
7+
run: async (client, interaction) => {
8+
await interaction.deferReply({ ephemeral: false });
9+
10+
const queue = client.distube.getQueue(interaction);
11+
if (!queue) return interaction.editReply(`There is nothing in the queue right now!`);
12+
const { channel } = interaction.member.voice;
13+
if (!channel || interaction.member.voice.channel !== interaction.guild.members.me.voice.channel) return interaction.editReply("You need to be in a same/voice channel.")
14+
15+
await client.distube.shuffle(interaction);
16+
17+
const embed = new EmbedBuilder()
18+
.setColor(client.color)
19+
.setDescription(`\`🔀\` | **Song has been:** \`Shuffle\``);
20+
21+
interaction.editReply({ embeds: [embed] });
22+
}
23+
}

commands/Context/Skip.js

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
const { EmbedBuilder, ApplicationCommandType } = require('discord.js');
2+
3+
module.exports = {
4+
name: ["Context | Skip"],
5+
type: ApplicationCommandType.Message,
6+
category: "Context",
7+
run: async (client, interaction) => {
8+
await interaction.deferReply({ ephemeral: false });
9+
10+
const queue = client.distube.getQueue(interaction);
11+
if (!queue) return interaction.editReply(`There is nothing in the queue right now!`);
12+
const { channel } = interaction.member.voice;
13+
if (!channel || interaction.member.voice.channel !== interaction.guild.members.me.voice.channel) return interaction.editReply("You need to be in a same/voice channel.")
14+
15+
if (queue.songs.length === 1 && queue.autoplay === false) {
16+
const embed = new EmbedBuilder()
17+
.setColor(client.color)
18+
.setDescription("\`🚨\` | **There are no** `Songs` **in queue**")
19+
20+
interaction.editReply({ embeds: [embed] });
21+
} else {
22+
await client.distube.skip(interaction);
23+
24+
const embed = new EmbedBuilder()
25+
.setColor(client.color)
26+
.setDescription("\`⏭\` | **Song has been:** `Skipped`")
27+
28+
interaction.editReply({ embeds: [embed] });
29+
}
30+
}
31+
}

commands/Music/247.js

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
const { EmbedBuilder } = require('discord.js');
2+
const { Database } = require("st.db");
3+
4+
const GVoice = new Database("./settings/models/voice.json", { databaseInObject: true });
5+
6+
module.exports = {
7+
name: ["music", "247"],
8+
description: "24/7 in voice channel",
9+
category: "Music",
10+
run: async (client, interaction) => {
11+
await interaction.deferReply({ ephemeral: false });
12+
13+
const queue = client.distube.getQueue(interaction);
14+
if (!queue) return interaction.editReply(`There is nothing in the queue right now!`);
15+
const { channel } = interaction.member.voice;
16+
if (!channel || interaction.member.voice.channel !== interaction.guild.members.me.voice.channel) return interaction.editReply("You need to be in a same/voice channel.")
17+
18+
const db = await GVoice.get(interaction.guild.id);
19+
20+
if (db.voice_enable === true) {
21+
await client.createDVoice(interaction);
22+
23+
const embed = new EmbedBuilder()
24+
.setDescription(`\`🌙\` | *Mode 24/7 has been:* \`Deactivated\``)
25+
.setColor(client.color);
26+
27+
interaction.editReply({ embeds: [embed] });
28+
} else if (db.voice_enable === false) {
29+
await client.createEVoice(interaction);
30+
31+
const embed = new EmbedBuilder()
32+
.setDescription(`\`🌕\` | *Mode 24/7 has been:* \`Activated\``)
33+
.setColor(client.color);
34+
35+
interaction.editReply({ embeds: [embed] });
36+
}
37+
}
38+
}

commands/Music/Autoplay.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,19 +13,19 @@ module.exports = {
1313
if (!channel || interaction.member.voice.channel !== interaction.guild.members.me.voice.channel) return interaction.editReply("You need to be in a same/voice channel.")
1414

1515
if (!queue.autoplay) {
16-
client.distube.toggleAutoplay(interaction);
16+
await client.distube.toggleAutoplay(interaction);
1717

1818
const embed = new EmbedBuilder()
1919
.setColor(client.color)
20-
.setDescription(`\`\` Activate **Autoplay** mode.`);
20+
.setDescription(`\`📻\` | *Autoplay has been:* \`Activated\``);
2121

2222
interaction.editReply({ embeds: [embed] });
2323
} else {
24-
client.distube.toggleAutoplay(interaction);
24+
await client.distube.toggleAutoplay(interaction);
2525

2626
const embed = new EmbedBuilder()
2727
.setColor(client.color)
28-
.setDescription(`\`\` Disable **Autoplay** mode.`);
28+
.setDescription(`\`📻\` | *Autoplay has been:* \`Deactivated\``);
2929

3030
interaction.editReply({ embeds: [embed] });
3131
}

commands/Music/ClearQueue.js

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
const { EmbedBuilder } = require('discord.js');
2+
3+
module.exports = {
4+
name: ["music", "clearqueue"],
5+
description: "Clear song in queue!",
6+
category: "Music",
7+
run: async (client, interaction) => {
8+
await interaction.deferReply({ ephemeral: false });
9+
10+
const queue = client.distube.getQueue(interaction);
11+
if (!queue) return interaction.editReply(`There is nothing in the queue right now!`);
12+
const { channel } = interaction.member.voice;
13+
if (!channel || interaction.member.voice.channel !== interaction.guild.members.me.voice.channel) return interaction.editReply("You need to be in a same/voice channel.")
14+
15+
await queue.delete();
16+
await client.UpdateQueueMsg(queue);
17+
18+
const embed = new EmbedBuilder()
19+
.setDescription(`\`📛\` | *Queue has been:* \`Cleared\``)
20+
.setColor(client.color);
21+
22+
interaction.editReply({ embeds: [embed] });
23+
}
24+
}

0 commit comments

Comments
 (0)