forked from viveksantayana/geas-bot
Pre-Deployment Still bugged as hell.
This commit is contained in:
@ -8,7 +8,7 @@ from discord_slash import SlashCommand, SlashContext, cog_ext, utils # Slash C
|
||||
from discord_slash.utils.manage_commands import create_choice, create_option # Slash Command features
|
||||
from pprint import pprint
|
||||
|
||||
from bot import clearConfig, configFile, loadCog, loadCogs, setConfig, unloadCog, unloadCogs, yaml_dump, yaml_load, reloadCog, reloadCogs
|
||||
from bot import clearConfig, configFile, loadCog, loadCogs, setConfig, unloadCog, unloadCogs, yaml_dump, yaml_load, reloadCog, reloadCogs, pitchesFile, cogsDir
|
||||
|
||||
##### Debug Cog
|
||||
class Debug(commands.Cog, name='Debug Commands'):
|
||||
@ -152,5 +152,17 @@ class Debug(commands.Cog, name='Debug Commands'):
|
||||
await self.client.slash.sync_all_commands()
|
||||
await ctx.reply(f'```All slash commands have been synced with the Server.```')
|
||||
|
||||
@commands.command(
|
||||
name='pitchreset',
|
||||
description='Debug feature that resets the pitches in case of any error. Clears pitch disables Pitch listeners.',
|
||||
brief='Reset running pitches.',
|
||||
aliases=['resetpitches', 'resetpitch']
|
||||
)
|
||||
async def _pitchreset(self, ctx:commands.Context):
|
||||
yaml_dump({}, pitchesFile)
|
||||
if self.client.get_cog('Pitch Listener') is not None:
|
||||
unloadCog(f'./{cogsDir}/events/secondary/pitch_listener.py')
|
||||
await ctx.reply('```Pitches have been hard reset.```')
|
||||
|
||||
def setup(client):
|
||||
client.add_cog(Debug(client))
|
Reference in New Issue
Block a user