beanieemann
beanieemann
DIAdiscord.js - Imagine an app
Created by beanieemann on 4/2/2024 in #djs-questions
can anyone help me revise the set position command
setPosition(role: MockRole, position: number) {
if (position < 0) position = 0;
const rolesToAdjust = this.guild.roles.cache.filter(
(role) => role.position! >= position
);
rolesToAdjust.forEach((role) => (role.position! += 1));
role.position = position;
}
setPosition(role: MockRole, position: number) {
if (position < 0) position = 0;
const rolesToAdjust = this.guild.roles.cache.filter(
(role) => role.position! >= position
);
rolesToAdjust.forEach((role) => (role.position! += 1));
role.position = position;
}
12 replies
DIAdiscord.js - Imagine an app
Created by beanieemann on 3/20/2024 in #djs-questions
how do I create a abstracted role layer for mocking
This is the current way I am mocking roles https://github.com/BeanieMen/HueHueHue/blob/master/tests%2Finteraction.ts How do I properly abstract the role layer
3 replies
DIAdiscord.js - Imagine an app
Created by beanieemann on 12/23/2022 in #djs-voice
audio aint working
const connection = joinVoiceChannel(
{
channelId: '1055401035599990795',
guildId: '1055401034354266143',
adapterCreator: message.channel.guild.voiceAdapterCreator,
});

const player = createAudioPlayer()
const resource = createAudioResource("e.mp3");
player.play(resource)
connection.subscribe(player)
const connection = joinVoiceChannel(
{
channelId: '1055401035599990795',
guildId: '1055401034354266143',
adapterCreator: message.channel.guild.voiceAdapterCreator,
});

const player = createAudioPlayer()
const resource = createAudioResource("e.mp3");
player.play(resource)
connection.subscribe(player)
35 replies