From 2fcd69c88114fb7e634040fe5dc8b95850b3f160 Mon Sep 17 00:00:00 2001 From: Vegard Berg Date: Mon, 17 Apr 2023 20:04:22 +0200 Subject: [PATCH] Fixed stray "V" at the end of a line --- heimdallr/Heimdallr.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/heimdallr/Heimdallr.py b/heimdallr/Heimdallr.py index c07cb04..86d73bf 100644 --- a/heimdallr/Heimdallr.py +++ b/heimdallr/Heimdallr.py @@ -2,6 +2,7 @@ import logging from os import getenv from typing import Optional +import sentry_sdk as sentry from naff import ( Client, Guild, @@ -111,8 +112,9 @@ class HeimdallrClient(Client): @slash_command(name="ping", description="Ping the bot") async def ping_command(self, ctx: InteractionContext): - ctx.ephemeral = True - await ctx.send("Pong!", components=RoleSelectMenu(placeholder="HONK")) + with sentry.start_transaction(op="ping"): + ctx.ephemeral = True + await ctx.send("Pong!", components=RoleSelectMenu(placeholder="HONK")) @slash_command(name="bot-info", description="Get info about the bot") async def bot_info_command(self, ctx: InteractionContext): @@ -283,6 +285,8 @@ def main(): JoinLeave.create_table() # Load extensions + if (sentry_token := getenv("SENTRY_TOKEN")) is not None: + bot.load_extension("naff.ext.sentry", token=sentry_token) bot.load_extension("heimdallr.commands.admin") bot.load_extension("heimdallr.commands.gatekeep") bot.load_extension("heimdallr.commands.quote") @@ -291,9 +295,10 @@ def main(): bot.load_extension("heimdallr.commands.polls") bot.load_extension("heimdallr.commands.bot_messages") bot.load_extension("heimdallr.commands.modmail") - bot.load_extension("heimdallr.commands.keyword_notify")V + bot.load_extension("heimdallr.commands.keyword_notify") bot.start(getenv("DISCORD_TOKEN")) if __name__ == "__main__": + import naff.ext.sentry main()