アクティビティの変更処理を移植

This commit is contained in:
suti7yk5032 2024-09-26 17:30:21 +09:00
parent 885f625403
commit 02e0b8b95d

View file

@ -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):