change logging level

This commit is contained in:
DasMoorhuhn 2024-02-16 02:04:08 +01:00
parent f9c9e66b94
commit d76f6d0799

View File

@ -81,19 +81,19 @@ async def on_ready():
@bot.event @bot.event
async def on_guild_join(guild: Guild): async def on_guild_join(guild: Guild):
logger.info("Added to Guild") logger.debug("Added to Guild")
await guild.system_channel.send("Hii^^") await guild.system_channel.send("Hii^^")
@tree.command(name='excuse', description='Get a random excuse from programmingexcuses') @tree.command(name='excuse', description='Get a random excuse from programmingexcuses')
async def slash(interaction: Interaction): async def slash(interaction: Interaction):
logger.info("Command: excuse") logger.debug("Command: excuse")
await interaction.response.send_message(programmer_excuses.get_excuse()) await interaction.response.send_message(programmer_excuses.get_excuse())
@tree.command(name='get-latest-comic', description='Get latest comic from XKCD') @tree.command(name='get-latest-comic', description='Get latest comic from XKCD')
async def slash(interaction: Interaction): async def slash(interaction: Interaction):
logger.info("Command: get-latest-comic") logger.debug("Command: get-latest-comic")
comic = xkcd.get_last_comic() comic = xkcd.get_last_comic()
embed = discord.Embed(title=comic.title, color=Color.blue(), url=f"{xkcd.url}/{comic.num}") embed = discord.Embed(title=comic.title, color=Color.blue(), url=f"{xkcd.url}/{comic.num}")
@ -103,7 +103,7 @@ async def slash(interaction: Interaction):
@tree.command(name='get-random-comic', description='Get a random comic from XKCD') @tree.command(name='get-random-comic', description='Get a random comic from XKCD')
async def slash(interaction: Interaction): async def slash(interaction: Interaction):
logger.info("Command: get-random-comic") logger.debug("Command: get-random-comic")
comic = xkcd.get_random_comic() comic = xkcd.get_random_comic()
embed = discord.Embed(title=comic.title, color=Color.blue(), url=f"{xkcd.url}/{comic.num}") embed = discord.Embed(title=comic.title, color=Color.blue(), url=f"{xkcd.url}/{comic.num}")
@ -119,7 +119,7 @@ async def slash(interaction: Interaction):
@tree.command(name="info", description="get info about this bot") @tree.command(name="info", description="get info about this bot")
async def slash(interaction: Interaction): async def slash(interaction: Interaction):
logger.info("Command: info") logger.debug("Command: info")
time_now = get_date_time()[2] time_now = get_date_time()[2]
uptime = time_now - start_time uptime = time_now - start_time
@ -138,7 +138,7 @@ async def slash(interaction: Interaction):
@tree.command(name="help", description="List of all Commands") @tree.command(name="help", description="List of all Commands")
async def slash(interaction: Interaction): async def slash(interaction: Interaction):
logger.info("Command: help") logger.debug("Command: help")
command_list_string = "" command_list_string = ""
command_list_string += "`/info` : Get infos about the server and the Bot\n" command_list_string += "`/info` : Get infos about the server and the Bot\n"
command_list_string += "`/help` : Get this view\n" command_list_string += "`/help` : Get this view\n"
@ -167,4 +167,4 @@ try:
except Exception as err: except Exception as err:
raise err raise err
finally: finally:
logger.info("Stopped") logger.debug("Stopped")