Discord bot will not respond to commands - discord

I am using this Replit demo to create a Discord bot: https://replit.com/#amasad/Discordpy-Music-Bot
I followed the instructions, and my bot is capable of logging in and staying online. The only thing wrong is it won't respond to any of my commands, not even if I add a simple print function.
If it's not in the code, I could have missed something in the Discord bot's permissions, but it can read and write messages as an administrator. I even went into the specific permissions of the server and enabled read/write messages, join voice, etc. Any idea what's going wrong?

I have checked out the repl you just mentioned above. But without reading your code it's not possible for us to know what you are doing wrong, so when you are asking a question please include your source code. And checkout this to know how to ask a good question: https://stackoverflow.com/help/how-to-ask.
The problem you just mentioned above can occur because of intents, I may or may not be right but since I didn't read your code this is the only thing I can think of at the moment. To fix this what you have to do is, add intents in your client definition. For example:
from discord.ext import commands
import discord
bot = commands.Bot(command_prefix="!", intents=discord.Intents.all())
After this, go to discord developers portal at https://discord.com/developers/applications and open your bot application. Then from the left tab go to Bot and you will see a section called Privileged Gateway Intents and then turn on the intents. This should fix your problem.

Related

Can I create an app or a bot in discord that send messages as it was me?

I want an app/bot that reads the last message that were sent to a specific channel on a server that I participate and depending on the text I want to send a message to that same channel. The thing is, I want to do it in my name, not using a bot id. I know that you can create a bot using your own name and avatar but what I really want is to send a message using my own account. Is that possible? Could not find anything like that in the docs, maybe a missed something?
I do not think you are even allowed to do this so I doubt the discord API would have support for this
Discord Guidelines
"Do not use self-bots or user-bots. Each account must be associated with a human, not a bot. Self-bots put strain on Discord’s infrastructure and our ability to run our services. For more information, you can read our Developer Policies"
However, if you really wanted to do this you could use a macro at the risk of getting your account banned by discord if they found out. You could create a macro in python using the pyautogui module.

How do I move a user to a different voice channel?

I'm making a Discord bot, and when a user joins a specific channel, I want my bot to move them to a different channel. I'm not too sure how to do it. I've tried doing newState.member.voice.setChannel(channel) and it doesn't seem to work. Though, I'm assuming it's outdated, but no errors were thrown when I did this, so I'm not too sure, can anyone help?

Discord.py bot is unable to do something yet another bot with same code can

So my bot able to go through channels and clear specific messages, but now it can't do it because of missing access. I made an another bot and fired up the same code. And it worked. How is this possible? I don't think there is a problem with the code, but with the bot itself.
Ensure that your bot has permissions set in discord.com/developers/applications - Under the bot tab make sure you've checked all the appropriate boxes. If you are truly running identical code that is most likely your issue.

Copy Reactions To Discord Messages

We made a mistake on our Discord server by using a free tool for managing roles. I won't mention it by name. The tool doesn't allow us to edit the original embed that contains all of the emojis and associated roles. As well, Discord doesn't seem to allow you to edit another user's messages, even if you own the server. And that makes good sense.
So what we're left with is creating a new roles message that looks like the old one and adding the reactions to it. However, we don't want everyone to have to go back and redo their reactions since moving the message wouldn't do anything to their existing roles. We still want to be able to see who reacted to the original message, and preferably be able to transfer the original reactions. I would like to know if it is possible to copy the old reactions over to the new message. I kind of think that Discord won't allow it in keeping with the model that you can't do something that a user would do for themselves. But I thought I would ask here first.
Our server management bot is built using JDA and runs on a Linux server.
No it's not possible to transfer over Discord reactions to a different message.
Use better botsite that can edit embed message or bot message
you can create here: https://botghost.com/?invite=981659393298923621
Go to embed builder and try to make a new post there and read how to edit bot post that you posted using this botghost

How to make a discord bot to auto send messages?

Is it possible to make a bot to automatically message people in my friends list or everyone from a specific server where i'm not an administrator? Where would i start, i know some Python but never worked with Discord bots, i was thinking this shouldn't be too hard as a first one?
I know i've received various messages / adveritsements from people on discord that i wouldn't think are admin on any server i'm on. Unless its done manually?
If you are wanting to write your own Discord bot in python, have a look at discord.py, follow the tutorial which will show you how to write simple commands and automated responses.
Is it possible to make a bot to automatically message people in my friends list or everyone from a specific server where i'm not an administrator?
You must have the required permissions to add the bot to the discord server. A role with 'regular' permissions will typically not allow you to do this. Additionally you can only have discord bots bound to a server, so a 'personal' bot that follows you around different servers is not really feasible.
I think what you're talking about is a self bot, which is against the Discord TOS and will likely get your account banned. If you want to get a bot on a Discord Server you'll have to ask an administrator.

Resources