Quantcast
Channel: Active questions tagged python - Stack Overflow
Viewing all articles
Browse latest Browse all 16654

After changing my discord server to Community Server my own bot doesn't work

$
0
0

So when I activated the community server, my commands like on_member_joun() or on_member_remove() stopped working, but when I turned back to the friend server, it worked. The question is next: Do I need to change anything in my bot to make it work?

Simply this command doesn't print hi.

@commands.Cog.listener()    async def on_member_join(self, member):        print('hi')         self.cursor.execute("SELECT user_id FROM `users` WHERE `user_id` = %s", (member.id,))        result = self.cursor.fetchone()        if result is None:            self.cursor.execute("INSERT INTO `users` (`user_id`, `cash`, `lvl`) VALUES (%s, %s, %s)", (member.id, 0, 0))            print(f"User {member.name} added to the database.")            connection.commit()

Viewing all articles
Browse latest Browse all 16654

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>