diff --git a/pybot-f.py b/pybot-f.py index 22436ec..6e176e2 100644 --- a/pybot-f.py +++ b/pybot-f.py @@ -6,6 +6,13 @@ import discord import asyncio import typing from discord.ext import commands +import logging + +logger = logging.getLogger('discord') +logger.setLevel(logging.DEBUG) +handler = logging.FileHandler(filename='discord.log', encoding='utf-8', mode='w') +handler.setFormatter(logging.Formatter('%(asctime)s:%(levelname)s:%(name)s: %(message)s')) +logger.addHandler(handler) description = '''Testing this bot stuff :)''' @@ -48,7 +55,7 @@ async def sync(ctx: commands.Context, guilds: commands.Greedy[discord.Object], s fmt = await ctx.bot.tree.sync() await ctx.send( - f"Synced {len(fmt)} commands {'globally' if spec is None else 'to the current guild.'}" + f"Synced {len(fmt)} commands {'globally' if spec is None else 'to the current guild. :)'}" ) return