do not process commands if author is self

This commit is contained in:
yuki 2025-10-07 08:06:35 -03:00
parent 6bcf41f208
commit 75dd4f796e

8
bot.py
View file

@ -38,6 +38,14 @@ class Bot(nerimity.Client):
if user.id == self.owner_id: return True
else: return False
async def _process_commands(self, message: nerimity.Message):
if message.author.id == self.account.id: return
await super()._process_commands(message)
def _process_slash_commands(self, message: nerimity.Message):
if message.author.id == self.account.id: return
super()._process_slash_commands(message)
async def init_db(self):
print("Initializing database...")
self.db = await aiosqlite.connect(self.db_file)