Box Bunny with Fan Noises
Box Bunny with Fan Noises
DIAdiscord.js - Imagine an app
Created by Box Bunny with Fan Noises on 7/9/2023 in #djs-voice
Trying to make a tts join command, getting invalid string format error
node version: v18.16.0 discordjs version: [email protected]
4 replies
DIAdiscord.js - Imagine an app
Created by Box Bunny with Fan Noises on 7/9/2023 in #djs-voice
interaction.guild.members.me.voice.channel gives null response?
and would I add it as const client = new Client({ intents: [GatewayIntentBits.GuildVoiceStates]}); ?
18 replies
DIAdiscord.js - Imagine an app
Created by Box Bunny with Fan Noises on 7/9/2023 in #djs-voice
interaction.guild.members.me.voice.channel gives null response?
no, should I?
18 replies
DIAdiscord.js - Imagine an app
Created by Box Bunny with Fan Noises on 7/9/2023 in #djs-voice
interaction.guild.members.me.voice.channel gives null response?
also when removing connection.destroy() it still has the same issue
18 replies
DIAdiscord.js - Imagine an app
Created by Box Bunny with Fan Noises on 7/9/2023 in #djs-voice
interaction.guild.members.me.voice.channel gives null response?
it was when the leave command was run, and it should return the disconnect after the message is sent
18 replies
DIAdiscord.js - Imagine an app
Created by Box Bunny with Fan Noises on 7/9/2023 in #djs-voice
interaction.guild.members.me.voice.channel gives null response?
Updated it to match the problem I was having with it
18 replies
DIAdiscord.js - Imagine an app
Created by Box Bunny with Fan Noises on 7/9/2023 in #djs-voice
interaction.guild.members.me.voice.channel gives null response?
when I was testing it, it only grabs the one I'm in
18 replies
DIAdiscord.js - Imagine an app
Created by Box Bunny with Fan Noises on 7/9/2023 in #djs-voice
interaction.guild.members.me.voice.channel gives null response?
are you sure it doesn't grab the one I'm in?
18 replies
DIAdiscord.js - Imagine an app
Created by Box Bunny with Fan Noises on 7/9/2023 in #djs-voice
interaction.guild.members.me.voice.channel gives null response?
sorry
18 replies
DIAdiscord.js - Imagine an app
Created by Box Bunny with Fan Noises on 7/9/2023 in #djs-voice
interaction.guild.members.me.voice.channel gives null response?
oh? I thought it grabbed the one I was in-
18 replies
DIAdiscord.js - Imagine an app
Created by Box Bunny with Fan Noises on 7/9/2023 in #djs-voice
interaction.guild.members.me.voice.channel gives null response?
node version: v18.16.0 discordjs version: [email protected]
18 replies
DIAdiscord.js - Imagine an app
Created by Box Bunny with Fan Noises on 7/8/2023 in #djs-voice
Creating a leave voice channel command for a bot
I appreciate all of the help
39 replies
DIAdiscord.js - Imagine an app
Created by Box Bunny with Fan Noises on 7/8/2023 in #djs-voice
Creating a leave voice channel command for a bot
it worked! thank you
39 replies
DIAdiscord.js - Imagine an app
Created by Box Bunny with Fan Noises on 7/8/2023 in #djs-voice
Creating a leave voice channel command for a bot
what does changing it to content do?
39 replies
DIAdiscord.js - Imagine an app
Created by Box Bunny with Fan Noises on 7/8/2023 in #djs-voice
Creating a leave voice channel command for a bot
const { SlashCommandBuilder } = require('discord.js');
const { getVoiceConnection } = require('@discordjs/voice')

module.exports = {
data: new SlashCommandBuilder()
.setName('leave')
.setDescription('Get the discord bot to leave the vc it is currently in <>_<>'),

async execute(interaction) {

const channel = interaction.options.getChannel('channel');

let connection = getVoiceConnection(interaction.guild.id);
if (connection === undefined) {
await interaction.reply("I am not in a vc!");
return;
};

await interaction.reply(`Successfully left ${interaction.guild.members.me.voice.channel.id}!`);

connection.destroy();
},
};
const { SlashCommandBuilder } = require('discord.js');
const { getVoiceConnection } = require('@discordjs/voice')

module.exports = {
data: new SlashCommandBuilder()
.setName('leave')
.setDescription('Get the discord bot to leave the vc it is currently in <>_<>'),

async execute(interaction) {

const channel = interaction.options.getChannel('channel');

let connection = getVoiceConnection(interaction.guild.id);
if (connection === undefined) {
await interaction.reply("I am not in a vc!");
return;
};

await interaction.reply(`Successfully left ${interaction.guild.members.me.voice.channel.id}!`);

connection.destroy();
},
};
39 replies
DIAdiscord.js - Imagine an app
Created by Box Bunny with Fan Noises on 7/8/2023 in #djs-voice
Creating a leave voice channel command for a bot
I changed it a bit so it's this as recommended
39 replies
DIAdiscord.js - Imagine an app
Created by Box Bunny with Fan Noises on 7/8/2023 in #djs-voice
Creating a leave voice channel command for a bot
Cannot read properties of null (reading 'id')
39 replies
DIAdiscord.js - Imagine an app
Created by Box Bunny with Fan Noises on 7/8/2023 in #djs-voice
Creating a leave voice channel command for a bot
tried it, and it still gave me the same error
39 replies
DIAdiscord.js - Imagine an app
Created by Box Bunny with Fan Noises on 7/8/2023 in #djs-voice
Creating a leave voice channel command for a bot
tried it, and it still gave me the same error so I'm wondering if it's an issue with the statement in general
39 replies
DIAdiscord.js - Imagine an app
Created by Box Bunny with Fan Noises on 7/8/2023 in #djs-voice
Creating a leave voice channel command for a bot
oh, so if I reformat it so the message appears before the disconnect it'll work?
39 replies