As a little test, I'm making a bot for discord that will take a message I send, delete it, and have the bot send the message. I've got some stuff working, but I have a couple of problems.
First, the bot won't always delete messages.
With this code
if message.content.startswith("H"):
print("test")
print(message.author)
msg=message.content
await client.delete_message(message)
await client.send_message(message.channel, msg)
the bot will only sometimes delete my message. Any idea why?
Second, I want it to only repeat my messages, but when I do this;
if message.author=="Myusername#1234":
print("test")
print(message.author)
msg=message.content
await client.delete_message(message)
await client.send_message(message.channel, msg)
Nothing happens. No error, just nothing. Can anyone help?
P.S: Myusername#1234
is just an example, and not what I'm putting in.