diff --git a/.env.example b/.env.example index 109bdb6..9b29472 100644 --- a/.env.example +++ b/.env.example @@ -1,2 +1,4 @@ TOKEN="" DATABASE="" +TEST_GUILD_ID=[] +DEV_GUILD_ID=[] diff --git a/README.md b/README.md index 91f70d2..80fba69 100644 --- a/README.md +++ b/README.md @@ -7,6 +7,8 @@ ```py TOKEN="your token" DATABASE="your database file" + TEST_GUILD_ID=[test_guild_ids] + DEV_GUILD_ID=[dev_command_guild_ids] ``` - Make Virtual Environment & Activate it - POSIX diff --git a/constants.py b/constants.py index 3c8eab6..1c63c86 100644 --- a/constants.py +++ b/constants.py @@ -1,7 +1,7 @@ from typing import Final VERSION: Final[str] = "v0.1.0" # 봇 버전 -TEMPLATE_VERSION: Final[str] = "v1.3.1" # 템플릿 버전 +TEMPLATE_VERSION: Final[str] = "v1.4.1" # 템플릿 버전 HELP_SELECT_RAW: Final[dict[str, str]] = { # 간단한 명령어 설명(매개변수 미포함) "/도움말": "도움말을 출력합니다.", "/봇": "봇의 정보를 출력합니다.", diff --git a/functions/dev.py b/functions/dev.py index 6822e64..b1cff70 100644 --- a/functions/dev.py +++ b/functions/dev.py @@ -1,4 +1,6 @@ +from json import loads from logging import getLogger +from os import getenv from traceback import format_exc from aiosqlite import Error @@ -6,10 +8,11 @@ from discord.ext import commands from classes import Bot -from config import BAD, COLOR, DEV_GUILD_ID +from config import BAD, COLOR from utils import slash_command logger = getLogger(__name__) +DEV_GUILD_ID = loads(getenv("DEV_GUILD_ID")) class Dev(commands.Cog): diff --git a/utils/commands.py b/utils/commands.py index 686c3b7..4becc6f 100644 --- a/utils/commands.py +++ b/utils/commands.py @@ -1,6 +1,9 @@ +from json import loads +from os import getenv + from discord.commands import application_command, SlashCommand -from config import TEST_GUILD_ID +TEST_GUILD_ID = loads(getenv("TEST_GUILD_ID")) def slash_command(**kwargs):