I want to develop a discord bot. After trying the bot on my Raspberry Pi, I cannot read messages of the bot on the guilds. On the Raspberry Pi the program is working without any problems. Obviously I turned the pi off before starting the bot. I already tried kicking and reconnecting the bot on the servers, but that didn`t work. Private messages to the bot are running smoothly. The messages are blank, so the event is called, but nothing is printed to the command line.
import discord
from discord.ext import commands
bot = commands.Bot()
@bot.event
async def on_message(message):
print(message.content)
bot.run("TOKEN")
The content of the message variable is (I have changed the ids and some other variables):
<Message id=953328581969116272 channel=<TextChannel id=956654537448771667 name='general' position=0 nsfw=False news=False category_id=953322537446663665> type=<MessageType.default: 0> author=<Member id=689200156665367842 name='my_name' discriminator='0000' bot=False nick=None guild=<Guild id=953322535556471664 name='Test' shard_id=0 chunked=False member_count=2>> flags=<MessageFlags value=0>>
I`ve found an open github problem, but because discord.py is not continued I have to ask it here. (The link: https://github.com/Rapptz/discord.py/issues/6820)
CodePudding user response:
I figured it out, reinstalling the pycord liberary worked for me!
CodePudding user response:
Discord.py is back to development again, you should use it. You can ask these question in the discord.py Discord server and get quick response other than asking it at here!
Have fun coding!