CanineData
CanineData
DIAdiscord.js - Imagine an app
Created by CanineData on 10/15/2022 in #djs-questions
Prune member options
So I'm trying to create a prune command for my bot and am using interaction.guild.members.prune({ roles: [], days: smth }), what would I have to add into roles so it checks everyone and not just people without roles DJS: 14.6.0 Node: 16.13.1
18 replies
DIAdiscord.js - Imagine an app
Created by CanineData on 8/10/2022 in #djs-questions
Interaction has already been acknowledged
So I'm trying to create a user context menu command, but even if I defer or reply right after the event is fired I get the error Interaction has already been acknowledged. Here's my code:
if (interaction.isUserContextMenuCommand()) {
let user = interaction.targetUser
interaction.deferReply()
//interaction(`<a:loading:998633545977299025> Loading...`);
let warns = await this.infractions.getAll(user.id)
let embed = new EmbedBuilder()
.setTitle(`<:protonModeration:988116410578370591> ${user.tag}'s Infractions`)
.setColor('#d4132d')
.setFooter({ text: 'Proton Systems | 2.0', iconURL: this.user?.displayAvatarURL() })
.setTimestamp()
embed.setDescription(warns);

interaction.editReply({ embeds: [embed], content: '' })
}
if (interaction.isUserContextMenuCommand()) {
let user = interaction.targetUser
interaction.deferReply()
//interaction(`<a:loading:998633545977299025> Loading...`);
let warns = await this.infractions.getAll(user.id)
let embed = new EmbedBuilder()
.setTitle(`<:protonModeration:988116410578370591> ${user.tag}'s Infractions`)
.setColor('#d4132d')
.setFooter({ text: 'Proton Systems | 2.0', iconURL: this.user?.displayAvatarURL() })
.setTimestamp()
embed.setDescription(warns);

interaction.editReply({ embeds: [embed], content: '' })
}
10 replies
DIAdiscord.js - Imagine an app
Created by CanineData on 8/6/2022 in #djs-questions
Custom member util methods
How could I create custom member utils?
3 replies
DIAdiscord.js - Imagine an app
Created by CanineData on 7/20/2022 in #djs-voice
Why isn't the bot playing the audio
I'm using this code from the guide and the bot is joining the channel, but not playing any audio. How could I fix this? Here's my code:
const connection = joinVoiceChannel({
channelId: channel.id,
guildId: interaction.guildId,
adapterCreator: channel.guild.voiceAdapterCreator,
selfDeaf: false
});
const player = createAudioPlayer({
behaviors: {noSubscriber: NoSubscriberBehavior.Pause},
});
connection.subscribe(player)
const resource = createAudioResource('music/Steps.mp3', { metadata: {channel: channel} });
player.play(resource);
interaction.editReply(`Playing ${channel.toString()}`)
const connection = joinVoiceChannel({
channelId: channel.id,
guildId: interaction.guildId,
adapterCreator: channel.guild.voiceAdapterCreator,
selfDeaf: false
});
const player = createAudioPlayer({
behaviors: {noSubscriber: NoSubscriberBehavior.Pause},
});
connection.subscribe(player)
const resource = createAudioResource('music/Steps.mp3', { metadata: {channel: channel} });
player.play(resource);
interaction.editReply(`Playing ${channel.toString()}`)
I'm also not getting any errors
6 replies
DIAdiscord.js - Imagine an app
Created by CanineData on 7/18/2022 in #djs-questions
What is APIInteractionGuildMember?
19 replies