Questions tagged [commando]

A command framework for discord.js

Commando is the official command framework for discord.js. It is flexible, fully object-oriented, easy to use, and makes it trivial to create your own powerful commands.

NPM

79 questions
0
votes
2 answers

How to fix "Null" output for AFK Channel

I'm having a problem where when I launch my bot and run this command, it says "undefined" or "null" as the output. How do I fix this? I've tried using the same method as I did for all the other options. if (serv.verified == false) { var veri =…
SomePerson
  • 1,171
  • 4
  • 16
  • 45
0
votes
1 answer

(Discord.js) How do i get all the members connected to the voice channels of a category?

So, i'm making a command called "movedebat" to move all the members connected to the voice channels of a channel category to a channel dedicated to debates. To achieve my goal, I am trying to get the list of all the connected members, to then use a…
0
votes
1 answer

How to get rid of "undefined" in Discord embeds

I'm trying to make it so that the output of this Discord embed won't be "undefined" for the Bot, Mute, and Deafen part of the embed. I tried to change some var to "let" or "const" I've tampered with the aboutuser portion to change it to something…
SomePerson
  • 1,171
  • 4
  • 16
  • 45
0
votes
1 answer

How to make a embed message to be edited later

I'm trying to develop some code that shows the bot when it went online, and let the embed message color change to something else every 2 seconds. (2000ms) But I don't know how, I get an error that says channel.send.edit is not a function or…
SomePerson
  • 1,171
  • 4
  • 16
  • 45
0
votes
3 answers

How to make code that removes roles from people randomly by guild position

I'm developing a bot where at a set interval, like every hour the bot will pick a random user and remove a role from them, it will be using the positioning on the side to do this. The problem was I couldn't really find a function in Discord.JS that…
SomePerson
  • 1,171
  • 4
  • 16
  • 45
0
votes
1 answer

How to run code with await in filter/collect code

I'm trying to make a confirmation portion of my command where if you activate the command, you need to say "yes" before the code activates. The reoccurring problem is that the code right after the message that says Confirmed... Please wait. After…
SomePerson
  • 1,171
  • 4
  • 16
  • 45
0
votes
1 answer

Embed Command (Colors) (discord.js-commando)

I've got a problem about an Embed Command, I am trying to let users choose color codes in this Embed Command, But this is an error I'm having: RangeError: Argument type "colorcode" isn't registered. . My Code: const { Command } =…
0
votes
1 answer

ReferenceError: servers not defined

When I run the command I get: ReferenceError: servers is not defined. but I don't find any error. Am I missing a package or anything? const commando = require('discord.js-commando'); const YTDL = require("ytdl-core"); function Play(connection,…
ShidouK
  • 7
  • 2
0
votes
1 answer

Can a bot respond to commands just like users?

I was making a script using Discord.js-commando to respond to a message, the command to execute this script sent by Streamlabs Chatbot. Upon sending the message I noticed it did not respond by its own command. Bot name is "Cuartel General", but case…
0
votes
1 answer

How to get values from object without any "name"?

I've got a piece of code in JS: var commands = require('commands.json'); module.exports = class CatCommand extends commando.Command { constructor(client) { super(client, { name: 'cat', group: 'fun', …
Lukser
  • 3
  • 1
0
votes
1 answer

Error when trying to code a music player for Discord bot

So I am trying to code a Discord bot via discord.js-commando in Visual Studio Code. I am trying to code the music player, and I am able to get the bot to join the voice channel. When inputting the URL I want it to play, though, the terminal gives me…
0
votes
1 answer

Random quote send from a bot - Unexpected Identifyer

So I'm getting a weird error message which looks like this: SyntaxError: Unexpected identifier at createScript (vm.js:80:10) at Object.runInThisContext (vm.js:139:10) at Module._compile (module.js:616:28) at…
Doggo
  • 2,133
  • 3
  • 16
  • 28
0
votes
0 answers

setTimeouts not always working on node.js discord bot

I created a discord bot using Node.js and the discord.js-commando framework. One of the features is to create writing sprints, which essentially is a timer, so you could say: I want to write for 20 minutes, starting in 5 minutes. The bot would then…
CMR
  • 1,366
  • 4
  • 15
  • 31
0
votes
2 answers

Creating a timed mute command with an image

I'm making a bot for my private discord servers with friends, we love Star Wars so I called it Darth Vader. I've been watching tutorials, and with this bot I've gotten pretty good but I'm stuck on a command. This command is called forcechoke. What…
Nicholxs
  • 11
  • 2
  • 3
0
votes
3 answers

Limiting commands to certain channels

I'm trying to build a bot with Commando, but I can't figure out a way to make the bot ignore commands (or better, delete and ignore) commands that are not sent in a defined channel. For example, if you don't send the command in #botchat the message…
Federico Grandi
  • 6,785
  • 5
  • 30
  • 50