Skip to content

Commit

Permalink
Fix issues with pterodactyl servers not syncing commands
Browse files Browse the repository at this point in the history
  • Loading branch information
parker02311 committed Apr 6, 2024
1 parent 335188e commit 72c0177
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion bot/__init__.py
Expand Up @@ -2,6 +2,7 @@
File: /bot/__init__.py
Usage: The bot's main file.
"""

from discord import Object as DiscordObject
from discord.ext.commands import Bot as BotBase
from . import config
Expand Down Expand Up @@ -41,7 +42,7 @@ async def setup_hook(self):

async def sync_commands(self):
for guildid in config.Bot.Guilds:
guild = DiscordObject(id=guildid)
guild = await self.fetch_guild(guildid)
self.tree.copy_global_to(guild=guild)
await self.tree.sync(guild=guild)

Expand Down
2 changes: 1 addition & 1 deletion pterodactyl-egg.json
Expand Up @@ -15,7 +15,7 @@
"file_denylist": [],
"startup": "if [[ ! -z ${VERSION} ]]; then\r\n echo -e \"Using version ${VERSION}\";\r\nelse\r\n echo -e \"Please set the VERSION variable\";\r\n exit 0;\r\nfi;\r\n\r\nif [[ -d .git ]] && [[ ${MODFILES} == 0 ]]; then\r\n echo -e \"Forcing git checkout\";\r\n git fetch --all --tags;\r\n git checkout tags\/${VERSION} -f;\r\nelif [[ -d .git ]] && [[ ${MODFILES} == 1 ]]; then\r\n echo -e \"User modify files enabled\";\r\n git fetch --all --tags;\r\n git checkout tags\/${VERSION};\r\nfi;\r\n\r\nif [ -f \/home\/container\/requirements.txt ]; then\r\n pip install -U --prefix .local -r \/home\/container\/requirements.txt;\r\nfi;\r\n\r\n\/usr\/local\/bin\/python -m prisma generate --schema \/home\/container\/mysql-schema.prisma;\r\n\r\n\/usr\/local\/bin\/python \/home\/container\/launcher.py;",
"config": {
"files": "{\r\n \"config.json\": {\r\n \"parser\": \"json\",\r\n \"find\": {\r\n \"API.Port\": \"{{server.build.default.port}}\"\r\n }\r\n }\r\n}",
"files": "{}",
"startup": "{\r\n \"done\": \"Database Connected\"\r\n}",
"logs": "{}",
"stop": "^C"
Expand Down

0 comments on commit 72c0177

Please sign in to comment.