When I start my discord bot that happens to me, which is what I have to do
This is a screenshot of the cmd
It looks like that you're trying to create a command in a guild where you don't have the permissions to create slash commands.
Try inviting your bot again with this invite link: https://discord.com/oauth2/authorize?client_id=YOUR-CLIENT-ID&scope=applications.commands+bot&permissions=8
Related
i want to make a command in Discord.NET that only can be ran by admins.
It would be great if anyone could give me an example thank you!
A command is basically a message that gets sent to the bot. You simply check if the message sender has a specific role ID. An admin role also has a role ID, if the role ID's match, you continue with the command.
How to check if bot has permission to add Slash Commands
Can anyone give me answer
I don't think this is possible through the discord API. I have found nothing in the official discord API docs or discord.js docs to say otherwise.
If you don't want to reinvite the bot you can always create a new invite link with application.commands enabled and use it. The new scope will be added to the already existing scopes.
According to me, you cannot check, but you can Reauthorize the bot in discord developer portal by selecting in Oauth Applications.command and bot while generating the link.
Or to check you can try to add slash command to server by checking the documentation
so I have this question. Is it possible to create a discord bot that can be runned, but doesn't have the [Bot] tag after the name? Just curious.
You can but it's not allowed. All official Discord bots will have the bot tag. It's possible to create a userbot with a user token, and this would not have the bot tag. However, selfbots go against Discord TOS
You can probably make code that controls a discord acc. Like you log in and the "bot" can auto type stuff if certain words are detected in the html code.
Hi everyone i am trying to code my own bot but i don't know to set these auto intergrated roles like this one,can someone explain me how they did this.enter image description here
Bots automatically create their own role with customised permissions(in the invite), the role cannot be added to other users.
When I add a bot to my server, a role is automatically created that is named like the bot.
I don't know if the message in the screenshot is exactly from this, but I can't add members to this bot role or edit it, only the bot has it and can have it.
I have a problem, and that is that every moment I get this error: DiscordAPIError: Missing Permissions and I don't know where it comes from or why
I'm not sure if anyone will still run into this issue but if you do. It could be a problem with your BOT being a lower level than the user or whatever your trying to do. For example most people have the Owner role on the top right? right. Well if you're trying to do something to a user above your bot like if the role BOT is under MEMBER and you try Banning MEMBER with BOT it won't work. Hope this helps
In 2021 this error can be fixed, if you are trying to let's say for example to create a ban all command for your discord bot, YOU HAVE TO DO THIS BEFORE GIVING UP ON IT. First go to https://discord.com/developers/applications and click on your bot's account then go to the option bot(the location were you get the bot token) then turn on those options:
EASY DIRECTIONS: Discord Developer Portal>(Click on your bot's account)>Bot(the place were you are getting the token from)>Privileged Gateway Intents>PRESENCE INTENT(TURN IT ON IF IT'S OFF)>SERVER MEMBERS INTENT(IT'S LOCATED IN THE SAME PAGE, TURN IT ON IF IT'S OFF) Those are the main thing that you have to do and then you can start to make your command!
In addition to the other answers given, I also needed to go to Server Settings > Roles. There you have a draggable list of roles available on your server. Drag your bots auto-assigned role (the bots name) to the top of the list. This will give it permission to assign subordinate roles.
I ran into this problem and it was because that I didn't give my bot the role to write in the channel. So make sure that your bot has the persmission to your channel.