Skip to content

Commit

Permalink
feat(sconfig): add origin and beta columns to edition_logs
Browse files Browse the repository at this point in the history
  • Loading branch information
ZRunner committed Aug 24, 2024
1 parent 8aa4b8e commit f4d5f98
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions modules/serverconfig/serverconfig.py
Original file line number Diff line number Diff line change
Expand Up @@ -289,8 +289,9 @@ async def on_config_edit(self, guild_id: int, user_id: int,
"Record a config edit event in the database"
if len(event_type) > 64:
raise ValueError("Event type cannot exceed 64 characters")
query = "INSERT INTO `edition_logs` (`guild_id`, `user_id`, `type`, `data`) VALUES (%s, %s, %s, %s)"
async with self.bot.db_main.write(query, (guild_id, user_id, event_type, json.dumps(data))):
query = "INSERT INTO `edition_logs` (`guild_id`, `user_id`, `type`, `data`, `origin`, `beta`) "\
"VALUES (%s, %s, %s, %s, 'bot', %s)"
async with self.bot.db_main.write(query, (guild_id, user_id, event_type, json.dumps(data)), self.bot.beta):
pass


Expand Down

0 comments on commit f4d5f98

Please sign in to comment.