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()