add client.tree.sync for commands

This commit is contained in:
2026-02-19 11:11:37 -07:00
parent 3c63906f85
commit 8ed5a0e81d

View File

@@ -39,11 +39,9 @@ parser.add_argument('channel_id')
@client.event @client.event
async def on_ready(): async def on_ready():
await client.tree.sync()
print(f'{client.user} has connected.') print(f'{client.user} has connected.')
print(f'we are using the guild {args.guild_id} and channel {args.channel_id}') print(f'we are using the guild {args.guild_id} and channel {args.channel_id}')
#guild: discord.Guild = await client.fetch_guild(args.guild_id)
#channel: discord.TextChannel = await client.fetch_channel(args.channel_id)
#await channel.send("test")
@client.tree.command() @client.tree.command()