Q
Q
QweRez2021-09-15 19:20:00
Python
QweRez, 2021-09-15 19:20:00

How to fix bot object has no attribute "send_message"?

unknown.png

@client.event
async def on_ready():
    Channel = client.get_channel('887722241641558088')
    Text= "YOUR_MESSAGE_HERE"
    Moji = await client.send(Channel, Text)
    await client.add_reaction(Moji, emoji='✅')

@client.event
async def on_reaction_add(reaction, user):
    Channel = client.get_channel('887722241641558088')
    if reaction.message.channel.id != Channel:
        return
    if reaction.emoji == "✅":
      Role = discord.utils.get(user.server.roles, name="ПИДАРАС")
      await client.add_roles(user, Role)

unknown.png

Answer the question

In order to leave comments, you need to log in

1 answer(s)
F
FOUREX, 2021-09-18
@QweRez

Use:
await Channel.send(Text)
(Apparently you moved here from telegram bots:>)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question