Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "musicify",
"version": "1.0.0",
"version": "1.2.0",
"description": "Musicify - A multi-guild Discord music bot with ChatPlay",
"main": "src/index.js",
"scripts": {
Expand Down
37 changes: 17 additions & 20 deletions src/commands/about.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,26 +35,23 @@ module.exports = {

container.addSeparatorComponents(new SeparatorBuilder().setDivider(true));

container.addTextDisplayComponents(
new TextDisplayBuilder().setContent(
"**What is Musicify?**\n" +
"-# A ChatPlay-focused Discord music bot that delivers high-quality\n" +
"-# music streaming directly to your voice channels.\n\n" +
"**Powered By**\n" +
"-# [discord.js](https://discord.js.org/) · [Riffy](https://riffy.js.org/) · [Musicard](https://www.npmjs.com/package/musicard)\n\n" +
"**Features**\n" +
"-# • **Rich now-playing cards** with progress bars\n" +
"-# • **10+ audio filter** presets\n" +
"-# • **Smart queue management** with pagination\n" +
"-# • **ChatPlay** — instant song requests\n" +
"-# • **Interactive button-based** controls"
)
);

container.addTextDisplayComponents(
new TextDisplayBuilder().setContent(
"-# Musicify is [open source](https://github.com/codebymitch/Musicify). Built by a passionate team of developers."
)
// Package and dependencies section with ButtonAccessory
container.addSectionComponents(
new SectionBuilder()
.addTextDisplayComponents(
new TextDisplayBuilder().setContent(
"**Powered By**\n" +
"-# • [discord.js](https://discord.js.org/)\n" +
"-# • [Riffy](https://riffy.js.org/)\n" +
"-# • [Musicard](https://www.npmjs.com/package/musicard)"
)
)
.addButtonAccessory(
new ButtonBuilder()
.setLabel("Source Code")
.setURL("https://github.com/codebymitch/Musicify")
.setStyle(ButtonStyle.Link)
)
);

container.addSeparatorComponents(new SeparatorBuilder().setDivider(false));
Expand Down
98 changes: 64 additions & 34 deletions src/commands/bot-stats.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ const {
SeparatorBuilder,
SectionBuilder,
ThumbnailBuilder,
ButtonBuilder,
ButtonStyle,
} = require("discord.js");

module.exports = {
Expand All @@ -18,6 +20,7 @@ module.exports = {

const container = new ContainerBuilder();

// --- Header with bot avatar ---
const header = new SectionBuilder()
.addTextDisplayComponents(
new TextDisplayBuilder().setContent("### <:Musicify_Logo:1504329028356673536> Statistics")
Expand All @@ -32,6 +35,7 @@ module.exports = {

container.addSeparatorComponents(new SeparatorBuilder().setDivider(true));

// --- Calculate stats ---
const uptimeSeconds = process.uptime();
const startTime = new Date(Date.now() - uptimeSeconds * 1000);
const startTimestamp = Math.floor(startTime.getTime() / 1000);
Expand All @@ -47,49 +51,75 @@ module.exports = {
const activePlayers = client.riffy.players?.size || 0;
const totalNodes = client.riffy.nodes?.length || client.riffy.nodes?.size || 0;

container.addTextDisplayComponents(
new TextDisplayBuilder().setContent(
"**Bot ID**\n" +
`-# \`${client.user.id}\`\n` +
"**Uptime**\n" +
`-# <t:${startTimestamp}:f> (<t:${startTimestamp}:R>)\n` +
`-# *Times shown in your local timezone*\n` +
"**Ping**\n" +
`-# ${client.ws.ping}ms\n` +
"**Runtime**\n" +
`-# [Node.js ${process.version}](https://nodejs.org/) · [discord.js v${require("discord.js").version}](https://discord.js.org/)`
// --- General section with Support button accessory ---
const generalSection = new SectionBuilder()
.addTextDisplayComponents(
new TextDisplayBuilder().setContent(
"**Bot ID**\n" +
`-# \`${client.user.id}\`\n` +
"**Uptime**\n" +
`-# <t:${startTimestamp}:f> (<t:${startTimestamp}:R>)\n` +
`-# *Times shown in your local timezone*\n` +
"**Ping**\n" +
`-# ${client.ws.ping}ms\n` +
"**Runtime**\n" +
`-# [Node.js ${process.version}](https://nodejs.org/) · [discord.js v${require("discord.js").version}](https://discord.js.org/)`
)
)
);
.setButtonAccessory(
new ButtonBuilder()
.setLabel("Support")
.setURL("https://discord.gg/MRjEUhDCpZ")
.setStyle(ButtonStyle.Link)
);

container.addSectionComponents(generalSection);

container.addSeparatorComponents(new SeparatorBuilder().setDivider(true));

container.addTextDisplayComponents(
new TextDisplayBuilder().setContent(
"**Guilds**\n" +
`-# ${totalGuilds.toLocaleString()}\n` +
"**Users**\n" +
`-# ${totalUsers.toLocaleString()}\n` +
"**Channels**\n" +
`-# ${totalChannels.toLocaleString()}\n` +
"**Active Players**\n" +
`-# ${activePlayers}\n` +
"**Lavalink Nodes**\n" +
`-# ${totalNodes}`
// --- Server stats section with Vote button accessory ---
const serverSection = new SectionBuilder()
.addTextDisplayComponents(
new TextDisplayBuilder().setContent(
"**Guilds**\n" +
`-# ${totalGuilds.toLocaleString()}\n` +
"**Users**\n" +
`-# ${totalUsers.toLocaleString()}\n` +
"**Channels**\n" +
`-# ${totalChannels.toLocaleString()}`
)
)
);
.setButtonAccessory(
new ButtonBuilder()
.setLabel("⭐ Vote")
.setURL("https://top.gg/bot/1502977716196999309/vote")
.setStyle(ButtonStyle.Link)
);

container.addSectionComponents(serverSection);

container.addSeparatorComponents(new SeparatorBuilder().setDivider(true));

container.addTextDisplayComponents(
new TextDisplayBuilder().setContent(
"**Heap Used**\n" +
`-# ${memUsed} MB\n` +
"**Heap Total**\n" +
`-# ${memTotal} MB\n` +
"**RSS**\n" +
`-# ${memRSS} MB`
// --- Performance section with Suggest button accessory ---
const perfSection = new SectionBuilder()
.addTextDisplayComponents(
new TextDisplayBuilder().setContent(
"**Active Players**\n" +
`-# ${activePlayers}\n` +
"**Lavalink Nodes**\n" +
`-# ${totalNodes}\n` +
"**Memory**\n" +
`-# Heap: ${memUsed} / ${memTotal} MB · RSS: ${memRSS} MB`
)
)
);
.setButtonAccessory(
new ButtonBuilder()
.setLabel("💡 Suggest")
.setURL("https://discord.com/channels/1503210009251545152/1503721044291092480")
.setStyle(ButtonStyle.Link)
);

container.addSectionComponents(perfSection);

await interaction.editReply({
components: [container],
Expand Down
129 changes: 0 additions & 129 deletions src/commands/chatplay.js

This file was deleted.

5 changes: 3 additions & 2 deletions src/commands/clear.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,10 @@ module.exports = {
});
}

if (!interaction.member.voice?.channel) {
const { canControlMusic, VOICE_CHANNEL_DENIAL } = require("../utils/permissions");
if (!canControlMusic(interaction.member, player)) {
return interaction.reply({
content: "❌ You need to be in a voice channel!",
content: VOICE_CHANNEL_DENIAL,
flags: MessageFlags.Ephemeral,
});
}
Expand Down
5 changes: 3 additions & 2 deletions src/commands/filter.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,9 @@ module.exports = {
if (!player || !player.current) {
return interaction.reply({ content: "❌ Nothing is playing right now.", flags: MessageFlags.Ephemeral });
}
if (!interaction.member.voice?.channel) {
return interaction.reply({ content: "❌ You need to be in a voice channel!", flags: MessageFlags.Ephemeral });
const { canControlMusic, VOICE_CHANNEL_DENIAL } = require("../utils/permissions");
if (!canControlMusic(interaction.member, player)) {
return interaction.reply({ content: VOICE_CHANNEL_DENIAL, flags: MessageFlags.Ephemeral });
}

const preset = interaction.options.getString("preset");
Expand Down
Loading