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
1
vote
1 answer

How do I list all users with a certain role with the role's ID? I'm using Discord.js Commando

I get an error 'TypeError: Cannot read property 'roles' of undefined' The command I'm trying to make should list all the users with a certain role in the main server. This is a public bot too so it's in multiple servers. The code I'm currently using…
Kausar Ahmed
  • 31
  • 1
  • 7
1
vote
2 answers

How to make a bot know how to delete webhooks that it made and by channel mentions

Hi I want to make a Discord.JS-Commando command where if you select a channel, the bot removes a webhook it owns there and if it's named Marker and if it detects if there's no webhook there that it owns named Marker it just return…
SomePerson
  • 1,171
  • 4
  • 16
  • 45
1
vote
0 answers

Issues with installing sqlite3 in NPM

So I'm just setting up my Discord bot in a new machine. I used the latest Node version in LTS and I have Windows Build Tools installed. But doing npm install, everything is going well until the part when the sqlite3 package is being installed. I…
1
vote
1 answer

How to fix 'Supplied parameter was neither a User or Role.'

I'm trying to make a bot make a role and go to a specified channel in the arguments of a command. The code will make the bot go to the specified channel, and add permissions for the role that the bot just made, and that's where the problem is. The…
SomePerson
  • 1,171
  • 4
  • 16
  • 45
1
vote
1 answer

Cannot read property 'nsfw' of undefined - discord.js

I'm currently working on a discord bot that makes use of 'discord.js', 'discord.js-commando' and 'snekfetch'. I'm trying to create a function in which if a guild member were to type "!meme", the discord bot will grab a random post from r/dankmemes…
Bhindley0404
  • 15
  • 1
  • 4
1
vote
0 answers

Simplifying a One-Time Message Channel bot

I'm basically trying to make code into where it's user-friendly. Basically into a command. There are two commands but I'm only working on one at the moment. A one-time message channel. I'd like to make it where you can add a channel where if you…
SomePerson
  • 1,171
  • 4
  • 16
  • 45
1
vote
1 answer

How to fix discord.js-commando bot responding to unknown commands

I'm creating the client with the unknownCommandResponse property set to false: const client = new CommandoClient({ commandPrefix: '$', unknownCommandResponse: false, owner: '291048060845424640', disableEveryone: true }); Yet when I try…
nothing
  • 305
  • 4
  • 12
1
vote
1 answer

How to fix "DeprecationWarning: Collection#filterArray: use Collection#filter"?

I'm setting up a new discord bot, and want to join a voice channel. When I write the command !join, the terminal sends me this message: DeprecationWarning: Collection#filterArray: use Collection#filter instead. const commando =…
1
vote
2 answers

Ban command is not being recognized

The command requires a reason to work, however, it still does not ban even if I mention someone and give a reason. It's like the command isn't recognized! bot.on('message', async message => { if (message.content == prefix + "ban") { if…
Marcus
  • 11
  • 1
  • 4
0
votes
2 answers

duscird.js get the name of the user involved

I have a command in which one user virtually kisses another The output is a message @User1 kissed @User2 But I want that instead of tags on the user, only names were written, like this so that it was user1 kissed user2 In theory, everything should…
user18568225
0
votes
1 answer

MongoDB declare model and delete data

I'm trying to create a discord bot, specifically the married. In the last topic, I implemented the marry command MongoDB findOne() Cannot read property of null Now, using the same logic, I'm trying to make a divorce command that will delete data…
user18568225
0
votes
1 answer

MongoDB findOne() Cannot read property of null

I'm trying to create a discord bot, specifically the married. I am using a MongoDB database. There is only one problem right now, when the database is empty, I get this error An error occurred while running the command: TypeError: Cannot read…
user18568225
0
votes
2 answers

Validation does not work and data save for the second round in MongoDB

I'm trying to create a discord bot, specifically the married. I am using a MongoDB database. Now everything works and is saved, but there is one problem, the data is saved for the second and third rounds, etc. That is, the checks that I added do not…
user18568225
0
votes
1 answer

DiscordJS Commando TypeError: Cannot read property 'on' of null

Got a ticket command that I used with an old command handler, and I edited the code to make it work with DiscordJS Commando v12.5 and it says TypeError: Cannot read property 'on' of null, there is only one spot in the code where i say 'on' and thats…
0
votes
1 answer

How to substract and divide numbers in loops discord.js

Coding a discord bot using the commando framework of discord.js v12.5, made an 'add' and 'multiply' command that adds every single number inputted by a user. Here is the code for the 'add' command: const Discord = require('discord.js') const…