アクティビティの変更処理を移植
This commit is contained in:
parent
885f625403
commit
02e0b8b95d
1 changed files with 8 additions and 5 deletions
|
@ -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):
|
||||
|
|
Loading…
Reference in a new issue