-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathowner.py
28 lines (21 loc) · 1.06 KB
/
owner.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
import discord
from discord import app_commands
from discord.ext import commands
class OWNER(commands.Cog, description='Administrative Commands'):
def __init__(self, bot):
self.bot = bot
@app_commands.command(name='sync', description='Syncs the Command Tree')
async def sync(self, interaction: discord.Interaction):
await self.bot.tree.sync()
await interaction.response.send_message('Command tree synced.')
@app_commands.command(name='syncowner', description='Syncs the Owner Command Tree')
async def syncowner(self, interaction: discord.Interaction):
await self.bot.tree.sync(guild=discord.Object(id=930252479264882708))
await interaction.response.send_message('Owner Command tree synced.')
@commands.command(name='syn', description='Syncs the Command Tree')
async def syn(self, ctx):
print('syncing')
await self.bot.tree.sync()
await ctx.send('Command tree synced.')
async def setup(bot: commands.Bot):
await bot.add_cog(OWNER(bot), guild=discord.Object(id=930252479264882708))