アクティビティの変更処理を移植
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
|
@client.event
|
||||||
async def on_ready():
|
async def on_ready():
|
||||||
print("Bot is ready.")
|
dislocker.log(title=f"[SUCCESS] DiscordのBotが起動しました。", message=f"{client.user.name} としてログインしています。", flag=1)
|
||||||
print("Logged in as")
|
|
||||||
print(client.user.name)
|
|
||||||
print(client.user.id)
|
|
||||||
print("------")
|
|
||||||
await tree.sync()
|
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
|
@client.event
|
||||||
async def on_interaction(interaction: discord.Interaction):
|
async def on_interaction(interaction: discord.Interaction):
|
||||||
|
|
Loading…
Reference in a new issue