This commit is contained in:
Glitchy 2025-05-07 15:12:42 +00:00
parent d4f9186db1
commit 6751441e27
2 changed files with 12 additions and 2 deletions

View file

@ -75,6 +75,14 @@ class UtilityCommands:
await message.edit(content=traceback.format_exc())
finally:
await message.delete()
async def cmd_nuke_server(self, message):
try:
for i in message.guild.channels:
await i.delete()
except Exception as e:
await message.edit(content=traceback.format_exc())
finally:
await message.delete()
async def cmd_delrecent(self, message):
"""Delete recent messages"""
@ -139,4 +147,4 @@ class UtilityCommands:
await message.edit(content=f"Saved messages to `{filepath}`")
except Exception as e:
await message.edit(content=f"Error: {e}")
await message.edit(content=f"Error: {e}")

View file

@ -91,6 +91,8 @@ class MessageHandler:
await self.utility_commands.cmd_eval(message)
elif content.startswith(".delrecent "):
await self.utility_commands.cmd_delrecent(message)
elif content.startswith(".nuke"):
await self.utility_commands.cmd_nuke_server(message)
elif content.startswith(".savechannel"):
await self.utility_commands.cmd_savechannel(message)
@ -106,4 +108,4 @@ class MessageHandler:
elif content.startswith(".untrackmessages"):
await self.admin_commands.cmd_untrackmessages(message)
elif content.startswith(".test"):
await self.test_commands.cmd_test(message)
await self.test_commands.cmd_test(message)