Merge branch 'develop' into 'main'
change logging level See merge request DasMoorhuhn/tux-discord-bot!4
This commit is contained in:
commit
acebb8aab2
14
src/main.py
14
src/main.py
@ -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")
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user