Hi ๐ Question, is it possible to use a command group variable in another file? I am trying to work on a backup sys and i'm trying to distribute code between different files so that is not one whole file with 1k lines of code, as of right now i'm trying to make /backup admin manage, i got to a point where it did show up but didn't work, it gave a signature mismatch type error.
Essentially using this group command
import discord
from discord.ext import commands
from discord import app_commands
import json
import os
import aiohttp
import requests
from io import BytesIO
import asyncio
from PIL import Image, ImageDraw, ImageFont
from discord.ui import View, Button
import math
from typing import List
BACKUPS_PER_PAGE = 5
admin_group = app_commands.Group(name="admin", description="Admin commands", parent=Backup.backup_group)
class Backup(commands.Cog):
def __init__(self, bot):
self.bot = bot
self.backup_dir = 'data/backups'
os.makedirs(self.backup_dir, exist_ok=True)
self.backup_limits = {
"max_backups": 5,
"max_size_mb": 10
}
backup_group = app_commands.Group(name="backup", description="Manage server backups")```
in:
```py
import discord
from discord.ext import commands
from discord import app_commands
from backup_sys.Backup import Backup
import backup_sys.Backup
class BackupAdmin(commands.Cog):
def __init__(self, bot):
self.bot = bot
@backup_sys.Backup.admin_group.command(name="manage", description="Manage admin backups")
async def manage(self, interaction: discord.Interaction):
await interaction.response.send_message("Managing backups...")```
Currently Its a bit messy been trying to move things from places and testing with it but no good results.
Thank you for your help and time. ๐