From 02e0b8b95d3e64eeec9c6a39edacc5f14851f078 Mon Sep 17 00:00:00 2001 From: suti7yk5032 Date: Thu, 26 Sep 2024 17:30:21 +0900 Subject: [PATCH] =?UTF-8?q?=E3=82=A2=E3=82=AF=E3=83=86=E3=82=A3=E3=83=93?= =?UTF-8?q?=E3=83=86=E3=82=A3=E3=81=AE=E5=A4=89=E6=9B=B4=E5=87=A6=E7=90=86?= =?UTF-8?q?=E3=82=92=E7=A7=BB=E6=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- dislocker_slash.py | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/dislocker_slash.py b/dislocker_slash.py index 10abe07..6a04f02 100644 --- a/dislocker_slash.py +++ b/dislocker_slash.py @@ -863,12 +863,15 @@ tree = discord.app_commands.CommandTree(client) @client.event async def on_ready(): - print("Bot is ready.") - print("Logged in as") - print(client.user.name) - print(client.user.id) - print("------") + dislocker.log(title=f"[SUCCESS] DiscordのBotが起動しました。", message=f"{client.user.name} としてログインしています。", flag=1) await tree.sync() + dislocker_activity = discord.Activity( + name=dislocker.server_config["bot"]["activity"]["name"], + type=discord.ActivityType.competing, + details=dislocker.server_config["bot"]["activity"]["details"], + state=dislocker.server_config["bot"]["activity"]["state"] + ) + await client.change_presence(activity=dislocker_activity) @client.event async def on_interaction(interaction: discord.Interaction):