1techy.
1techy.
DIAdiscord.js - Imagine an app
Created by 1techy. on 9/1/2023 in #djs-questions
Error with deploying commands
yeah im new to this whole js thing
28 replies
DIAdiscord.js - Imagine an app
Created by 1techy. on 9/1/2023 in #djs-questions
Error with deploying commands
and its a private bot
28 replies
DIAdiscord.js - Imagine an app
Created by 1techy. on 9/1/2023 in #djs-questions
Error with deploying commands
the bot is only in 4 servers
28 replies
DIAdiscord.js - Imagine an app
Created by 1techy. on 9/1/2023 in #djs-questions
Error with deploying commands
so i can also deleete the type: 'string', part too?
28 replies
DIAdiscord.js - Imagine an app
Created by 1techy. on 9/1/2023 in #djs-questions
Error with deploying commands
where?
28 replies
DIAdiscord.js - Imagine an app
Created by 1techy. on 9/1/2023 in #djs-questions
Error with deploying commands
how would i add a paramiter then?
28 replies
DIAdiscord.js - Imagine an app
Created by 1techy. on 9/1/2023 in #djs-questions
Error with deploying commands
/home/runner/utcutil30/commands/whitelistedCmds/dban.js:19
await execute(interaction) {
^^^^^

SyntaxError: Unexpected reserved word
at Object.compileFunction (node:vm:360:18)
at wrapSafe (node:internal/modules/cjs/loader:1088:15)
at Module._compile (node:internal/modules/cjs/loader:1123:27)
at Module._extensions..js (node:internal/modules/cjs/loader:1213:10)
at Module.load (node:internal/modules/cjs/loader:1037:32)
at Module._load (node:internal/modules/cjs/loader:878:12)
at Module.require (node:internal/modules/cjs/loader:1061:19)
at require (node:internal/modules/cjs/helpers:103:18)
at Object.<anonymous> (/home/runner/utcutil30/deploy-commands.js:15:19)
at Module._compile (node:internal/modules/cjs/loader:1159:14)

Node.js v18.12.1
/home/runner/utcutil30/commands/whitelistedCmds/dban.js:19
await execute(interaction) {
^^^^^

SyntaxError: Unexpected reserved word
at Object.compileFunction (node:vm:360:18)
at wrapSafe (node:internal/modules/cjs/loader:1088:15)
at Module._compile (node:internal/modules/cjs/loader:1123:27)
at Module._extensions..js (node:internal/modules/cjs/loader:1213:10)
at Module.load (node:internal/modules/cjs/loader:1037:32)
at Module._load (node:internal/modules/cjs/loader:878:12)
at Module.require (node:internal/modules/cjs/loader:1061:19)
at require (node:internal/modules/cjs/helpers:103:18)
at Object.<anonymous> (/home/runner/utcutil30/deploy-commands.js:15:19)
at Module._compile (node:internal/modules/cjs/loader:1159:14)

Node.js v18.12.1
28 replies
DIAdiscord.js - Imagine an app
Created by 1techy. on 9/1/2023 in #djs-questions
Error with deploying commands
Error:
28 replies
DIAdiscord.js - Imagine an app
Created by 1techy. on 9/1/2023 in #djs-questions
Error with deploying commands
const { SlashCommandBuilder } = require('discord.js');
const { client } = require('./config');
module.exports = {
data: new SlashCommandBuilder()
.setName('dban')
.setDescription('Bans a user from all servers the bot is in.')
.addParam('user', {
description: 'The user to ban.',
type: 'user',
})
.addParam('reason', {
description: 'The reason for the ban',
type: 'string',
})
.addParam('duration', {
description: 'The duration of the ban, in minutes',
type: 'integer',
})
await execute(interaction) {
const user = interaction.options.user;
const reason = interaction.options.reason;
const duration = interaction.options.duration;

const allowedUsers = require('./config.json').allowedUsers;

if (!allowedUsers.includes(interaction.user.id)) {
await interaction.reply('You are not authorized to use this command.');
return;
}

const guilds = client.guilds.cache;

for (const guild of guilds) {
guild.ban(user, { reason });
}
await interaction.reply(`Successfully banned ${user} from all of the servers. Reason: **${reason}**. Duration: **${duration} minutes.**`);
}
const { SlashCommandBuilder } = require('discord.js');
const { client } = require('./config');
module.exports = {
data: new SlashCommandBuilder()
.setName('dban')
.setDescription('Bans a user from all servers the bot is in.')
.addParam('user', {
description: 'The user to ban.',
type: 'user',
})
.addParam('reason', {
description: 'The reason for the ban',
type: 'string',
})
.addParam('duration', {
description: 'The duration of the ban, in minutes',
type: 'integer',
})
await execute(interaction) {
const user = interaction.options.user;
const reason = interaction.options.reason;
const duration = interaction.options.duration;

const allowedUsers = require('./config.json').allowedUsers;

if (!allowedUsers.includes(interaction.user.id)) {
await interaction.reply('You are not authorized to use this command.');
return;
}

const guilds = client.guilds.cache;

for (const guild of guilds) {
guild.ban(user, { reason });
}
await interaction.reply(`Successfully banned ${user} from all of the servers. Reason: **${reason}**. Duration: **${duration} minutes.**`);
}
28 replies
DIAdiscord.js - Imagine an app
Created by 1techy. on 9/1/2023 in #djs-questions
Error with deploying commands
code:
28 replies
DIAdiscord.js - Imagine an app
Created by 1techy. on 9/1/2023 in #djs-questions
Error with deploying commands
node.js v18.12.1
28 replies
DIAdiscord.js - Imagine an app
Created by 1techy. on 9/1/2023 in #djs-questions
Error with deploying commands
28 replies
DIAdiscord.js - Imagine an app
Created by 1techy. on 6/30/2022 in #djs-questions
TypeError on my discord bot when i run it
fr?
90 replies
DIAdiscord.js - Imagine an app
Created by 1techy. on 6/30/2022 in #djs-questions
TypeError on my discord bot when i run it
will yt help me?
90 replies
DIAdiscord.js - Imagine an app
Created by 1techy. on 6/30/2022 in #djs-questions
TypeError on my discord bot when i run it
do you think i can make like a multipurpose bot that can do small things?
90 replies
DIAdiscord.js - Imagine an app
Created by 1techy. on 6/30/2022 in #djs-questions
TypeError on my discord bot when i run it
which one . . sorry theres ALOT
90 replies
DIAdiscord.js - Imagine an app
Created by 1techy. on 6/30/2022 in #djs-questions
TypeError on my discord bot when i run it
bet ty
90 replies
DIAdiscord.js - Imagine an app
Created by 1techy. on 6/30/2022 in #djs-questions
TypeError on my discord bot when i run it
dont be mad, but i just started all this today, i dont :(
90 replies
DIAdiscord.js - Imagine an app
Created by 1techy. on 6/30/2022 in #djs-questions
TypeError on my discord bot when i run it
90 replies
DIAdiscord.js - Imagine an app
Created by 1techy. on 6/30/2022 in #djs-questions
TypeError on my discord bot when i run it
OHHHHH
90 replies