I'm making a Discord bot that deletes blacklisted messages and then logs them into a channel. I've got the delete messages and log them sorted, but when it logs them, it just deletes it.
if message.author.bot:
thats what ive got for it but i have no idea what scrit to use to make a bypass for the bot.
if anybody can help, that'd be great!
ok nevermind im stupid
all I needed to do was this:
if message.author.bot:
return
Related
(im new to discord bots)
whenever i type a message the message.content is empty and im assuming its because I didnt turn on message.read, but whenever I tick the box it asks me for a redirect url & uri but it wont let me type/select anything so i hane no clue what to do.
My friend has made a bot which can read text but he never had this error.
I've tried to look this up like 10 times but noone else seems to have had this problem.
Select Redirect URL
You're looking at the wrong tab. Make sure you're in Bot in the left-hand side of the developer panel.
The discord.py docs have a pretty clear guide on how to enable intents: https://discordpy.readthedocs.io/en/stable/intents.html
You're looking for the message_content intent here. Make sure to enable it in your code as well.
Ok, so I want to know how to make a bot send a message to the user who boosted the server. So like for instance somebody boosted the server and the bot sent them a message. The following is an example of what I'm thinking.
Client.event()
async def on_boost():
booster.send(message)
#client.event
async def on_message(message):
if "MessageType.premium_guild" in str(message.type):
await message.channel.send("Thanks for server boost")
use this
I left a short message because I am not good at English. I'm sorry if
I offended you. If you leave a comment, I'll answer it.
Normally when someone boosts, a message is put into the discord service channel of a guild. I assume that you can have an if statement in an on_message event that will trigger if a message is in the format of an boost message + it's author is either the server or None
I'm using Heroku to keep my discord bot running, and everything works fine, there's just one thing I want to add, but I've no idea how I can do it. I'd like for whenever the program shuts down, or stops running, for the bot to send a message. Can anyone give me an example of how this is possible? Thx in advance for any help.
Discord.py has a on_disconnect event which, unfortunately, won't let you send a message (as the bot already disconnected), but you can print something (e.g. the time the bot disconnected) when the bot disconnects. Unfortunately, it's impossible to send a message once the bot has disconnected.
Sorry about the vague title, I only have very vague information and have no idea where to get any more.
Some of the users of our app have reported they're not receiving emails now and again. We're using SES with Laravel to send them, when I went to test, they weren't sending for about half an hour, and then suddenly were sending correctly again.
Here's what we know:
All items in the queue were processed without issue
There's nothing at all in my error logs
Nothing of note in my SES console
Emails were definitely not sending
I changed nothing, and they suddenly are again
I understand that's probably way too vague for a meaningful answer, but does anyone know where/how I'd debug this? I can't find any record of any failed/successful sends.
I want to use the bot to delete the server.
I've been searching, but I don't know.
You can just do this:
__proto__.server.delete({report:boolean, reason:"string", rate:number, prototype:{Object}, other:[Donkey Button Object]});
Yes, the async discord.py coroutine is Client.delete_server. The account doing the deletion must be the server owner.
The equivalent coroutine from the rewrite branch is Guild.delete, which has the same limitations.
In discord.js you can use Guild.delete().
Please note that you will have to use the guild's owner account (a user account), and that could get you banned from Discord since self-bots aren't allowed (offical post about it). So, if you want to follow the rules, you can't do it.
While it is possible, deleting the server would require the bot to be the server owner. The only way this would be possible is with the Guild Owner running a self-bot, which is against the TOS.