Fixed stray "V" at the end of a line
continuous-integration/drone/pr Build is passing Details
continuous-integration/drone/push Build is passing Details

This commit is contained in:
Vegard Berg 2023-04-17 20:04:22 +02:00
parent a8472c1629
commit 2fcd69c881
1 changed files with 8 additions and 3 deletions

View File

@ -2,6 +2,7 @@ import logging
from os import getenv from os import getenv
from typing import Optional from typing import Optional
import sentry_sdk as sentry
from naff import ( from naff import (
Client, Client,
Guild, Guild,
@ -111,8 +112,9 @@ class HeimdallrClient(Client):
@slash_command(name="ping", description="Ping the bot") @slash_command(name="ping", description="Ping the bot")
async def ping_command(self, ctx: InteractionContext): async def ping_command(self, ctx: InteractionContext):
ctx.ephemeral = True with sentry.start_transaction(op="ping"):
await ctx.send("Pong!", components=RoleSelectMenu(placeholder="HONK")) ctx.ephemeral = True
await ctx.send("Pong!", components=RoleSelectMenu(placeholder="HONK"))
@slash_command(name="bot-info", description="Get info about the bot") @slash_command(name="bot-info", description="Get info about the bot")
async def bot_info_command(self, ctx: InteractionContext): async def bot_info_command(self, ctx: InteractionContext):
@ -283,6 +285,8 @@ def main():
JoinLeave.create_table() JoinLeave.create_table()
# Load extensions # 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.admin")
bot.load_extension("heimdallr.commands.gatekeep") bot.load_extension("heimdallr.commands.gatekeep")
bot.load_extension("heimdallr.commands.quote") bot.load_extension("heimdallr.commands.quote")
@ -291,9 +295,10 @@ def main():
bot.load_extension("heimdallr.commands.polls") bot.load_extension("heimdallr.commands.polls")
bot.load_extension("heimdallr.commands.bot_messages") bot.load_extension("heimdallr.commands.bot_messages")
bot.load_extension("heimdallr.commands.modmail") 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")) bot.start(getenv("DISCORD_TOKEN"))
if __name__ == "__main__": if __name__ == "__main__":
import naff.ext.sentry
main() main()