#๐Ÿ”’ Delete specific Message Code

21 messages ยท Page 1 of 1 (latest)

lost turret
#

Ive been trying to figure this out since im pretty new to coding, the code im trying to do is whenever the owner, admin, moderator and minimod reply to a user's message with "?dm" (short for delete message) it will delete the message you replied to. Example: if an admin replies to a user message with the command "?dm" it will delete the replied message.

half whaleBOT
#

@lost turret

Python help channel opened

Remember to:

  • Ask your Python question, not if you can ask or if there's an expert who can help.
  • Show a code sample as text (rather than a screenshot) and the error message, if you've got one.
  • Explain what you expect to happen and what actually happens.

:warning: Do not pip install anything that isn't related to your question, especially if asked to over DMs.

lost turret
#

anybody here?

lost turret
#

hopefully someone could help

lost turret
#

?

final lava
lost turret
#

ohh thanks

lost turret
final lava
lost turret
#

do i put it under message reference true?

#

sorry im not good at this stuff

final lava
#
intents = discord.Intents.default()
intents.message_references= True

client = bot.Bot('-', intents=intents)
lost turret
#

"client" is not defined

final lava
#

bro that's just and example client is just the name i used for my bot

#

i mean to say this is how you set intents for your bot

lost turret
#

ohh sorry

lost turret
lost turret
#

ohh

half whaleBOT
#
Python help channel closed

This help channel has been closed and it's no longer possible to send messages here. If your question wasn't answered, feel free to create a new post in #1035199133436354600. To maximize your chances of getting a response, check out this guide on asking good questions.