mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-11-23 11:13:51 -05:00
[V3 Sentry] Allow toggling of Sentry logging (#1214)
* Refactor sentry to allow toggle * Rename sentry module * Protect sentry manager * Fix tests * Fix EOF newlines * Add docstrings
This commit is contained in:
@@ -476,6 +476,23 @@ class Core:
|
||||
|
||||
await ctx.send(_("Locale has been set."))
|
||||
|
||||
@_set.command()
|
||||
@checks.is_owner()
|
||||
async def sentry(self, ctx: commands.Context, on_or_off: bool):
|
||||
"""Enable or disable Sentry logging.
|
||||
|
||||
Sentry is the service Red uses to manage error reporting. This should
|
||||
be disabled if you have made your own modifications to the redbot
|
||||
package.
|
||||
"""
|
||||
await ctx.bot.db.enable_sentry.set(on_or_off)
|
||||
if on_or_off:
|
||||
ctx.bot.enable_sentry()
|
||||
await ctx.send(_("Done. Sentry logging is now enabled."))
|
||||
else:
|
||||
ctx.bot.disable_sentry()
|
||||
await ctx.send(_("Done. Sentry logging is now disabled."))
|
||||
|
||||
@commands.command()
|
||||
@commands.cooldown(1, 60, commands.BucketType.user)
|
||||
async def contact(self, ctx, *, message: str):
|
||||
@@ -705,4 +722,3 @@ class Core:
|
||||
async def rpc_reload(self, request):
|
||||
await self.rpc_unload(request)
|
||||
await self.rpc_load(request)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user