auto guilds 2.0
This commit is contained in:
parent
b49ed138b6
commit
8a4bb04185
3
main.py
3
main.py
@ -22,7 +22,8 @@ async def on_ready():
|
||||
for m in client.modules:
|
||||
await m.load()
|
||||
async for guild in client.fetch_guilds():
|
||||
await tree.sync(guild=discord.Object(id=guild.id))
|
||||
tree.copy_global_to(guild=guild)
|
||||
await tree.sync(guild=guild)
|
||||
print(f"Logged in as {client.user} on {len(client.guilds)} servers!")
|
||||
|
||||
|
||||
|
@ -4,7 +4,7 @@ import discord
|
||||
from discord import app_commands
|
||||
|
||||
import httpx
|
||||
from client import tree
|
||||
from client import client, tree
|
||||
|
||||
|
||||
GUILD_ID = os.getenv("GUILD_ID")
|
||||
@ -40,7 +40,6 @@ init_gitea_projects()
|
||||
@tree.command(
|
||||
name="gitea-issue",
|
||||
description="Create issues to gitea",
|
||||
guild=discord.Object(id=GUILD_ID),
|
||||
)
|
||||
@app_commands.describe(
|
||||
title="Issue title", project="The project where the issue is created"
|
||||
|
Loading…
x
Reference in New Issue
Block a user