Compare commits

...

3 commits

Author SHA1 Message Date
414f5df5ae
add starting log 2025-06-14 03:41:28 -04:00
0fcbc8af21
add latency to ping command 2025-06-14 03:41:28 -04:00
bb6e5d2e8d
add guild join/leave notifications 2025-06-14 03:40:13 -04:00

View file

@ -191,6 +191,26 @@ async def on_error(event, *args, **kwargs):
log.error(f"Error in event {event}.\nargs={pargs}\nkwargs={pkwargs}", exc_info=sys.exc_info())
@bot.listen()
async def on_guild_join(guild):
await bot.owner.send(
f"""\
# Guild Joined: {guild.name}
Guild ID: `{guild.id}`
Member Count: `{guild.member_count}`"""
)
@bot.listen()
async def on_guild_remove(guild):
await bot.owner.send(
f"""\
# Guild Removed: {guild.name}
Guild ID: `{guild.id}`
Member Count: `{guild.member_count}`"""
)
help_timeouts = {}
@ -352,7 +372,7 @@ async def admin_eval(ctx, *, body: str):
@bot.command()
async def ping(ctx):
await ctx.send("Pong")
await ctx.send(f"Pong!\nLatency: {bot.latency*1000:.1f}ms")
@bot.command()
@ -385,6 +405,7 @@ async def portrait(ctx):
def run():
log.info("Starting Nomen")
try:
run_db_migrations(DB_FILE)
except RuntimeError: