fix: migrate all commands & src to @fluxerjs native API

- Replace replyEmbed/sendEmbed/editEmbed with reply/send/edit
  across all 33 command files and 5 src/ files
- Remove unnecessary .toJSON() on EmbedBuilder (Fluxer auto-converts)
- Fix voice channel type checks: channel_type === "VoiceChannel" → type === 2
- Add missing edit() and send() methods to Message/ChannelContext wrappers
- Fix filter command: reactions now update per page on navigation

Closes channel cache crash (guild.channels.cache.keys undefined)
This commit is contained in:
NoLogicAlan committed 2026-05-05 20:09:25 +03:00
1 parent 19820e7209
commit 85f11fe34b
38 files changed
+395 -314

No files matched your search

+8 -8
View File
@@ -10,8 +10,8 @@ export const command = new CommandBuilder()
export async function run(msg, data) {
const guild = msg.channel?.channel?.guild ?? msg.message?.guild;
if (!guild) {
const embed = new EmbedBuilder().setColor(getGlobalColor()).setDescription("❌ Must be used in a server.").toJSON();
return msg.replyEmbed({ embeds: [embed] });
const embed = new EmbedBuilder().setColor(getGlobalColor()).setDescription("❌ Must be used in a server.");
return msg.reply({ embeds: [embed] });
}
const channelCounts = new Map();
@@ -26,14 +26,14 @@ export async function run(msg, data) {
}
if (channelCounts.size === 0) {
const embed = new EmbedBuilder().setColor(getGlobalColor()).setDescription("No one is in voice.").toJSON();
return msg.replyEmbed({ embeds: [embed] });
const embed = new EmbedBuilder().setColor(getGlobalColor()).setDescription("No one is in voice.");
return msg.reply({ embeds: [embed] });
}
const getChannelName = async (channelId) => {
const cached = this.client.channels.cache.get(channelId);
const cached = this.client.channels.get(channelId);
if (cached?.name) return cached.name;
const guildCached = guild.channels?.cache?.get?.(channelId) ?? guild.channels?.get?.(channelId);
const guildCached = guild.channels?.get?.(channelId);
if (guildCached?.name) return guildCached.name;
if (guild.channels) {
const all = typeof guild.channels.values === "function"
@@ -58,6 +58,6 @@ export async function run(msg, data) {
.setColor(getGlobalColor())
.setTitle("🎙️ Voice Channel Members")
.setDescription(desc.trim())
.toJSON();
msg.replyEmbed({ embeds: [embed] });
;
msg.reply({ embeds: [embed] });
}