kevle1 / Discord-IP-Lookup

Checks for messages sent to Discord server containing an IP and looks up according information, sending embed containing results.
24 stars 23 forks source link

AttributeError: 'Client' object has no attribute 'send_message' #1

Open kevle1 opened 4 years ago

kevle1 commented 4 years ago

Newer versions of discord.py may encounter this error.

Due to: https://discordpy.readthedocs.io/en/latest/migrating.html

Replace line 61 await client.send_message(message.channel, embed=embed) with await message.channel.send(message.channel, embed=embed)

n1ke33 commented 3 years ago

What is the command for the bot?

kevle1 commented 3 years ago

@n1ke33 Simply send any IP in the chat (visible to the bot) and it will reply with information for that IP, the bot searches for messages containing an IP and looks up corresponding information.

n1ke33 commented 3 years ago

i tried that but nothing happens i have the token and api key. (can you make a short video)

kevle1 commented 3 years ago

In the console output, do you see the IP that you have sent? If it outputs "Error" or something, I recommend try removing lines 64 and 65 to see the full error.

Quick demonstration: https://i.imgur.com/LMr9uE5.mp4