Archived
generated from imcompiling/discord-bot-template
Compare commits
5
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6af2476339 | ||
|
|
4a3f356b23 | ||
|
|
4fe2339ac1 | ||
|
|
2069b2544f | ||
|
|
901bcf3c62 |
Vendored
+5
-5
@@ -5,11 +5,11 @@
|
|||||||
"version": "0.2.0",
|
"version": "0.2.0",
|
||||||
"configurations": [
|
"configurations": [
|
||||||
{
|
{
|
||||||
"name": "Python: Module",
|
"name": "Python: Module",
|
||||||
"type": "debugpy",
|
"type": "debugpy",
|
||||||
"request": "launch",
|
"request": "launch",
|
||||||
"module": "main",
|
"module": "off-cooldown-bot.main",
|
||||||
"justMyCode": true
|
"justMyCode": true
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
Vendored
+2
-5
@@ -4,8 +4,5 @@
|
|||||||
"reportArgumentType": "information",
|
"reportArgumentType": "information",
|
||||||
"reportAttributeAccessIssue": "warning"
|
"reportAttributeAccessIssue": "warning"
|
||||||
},
|
},
|
||||||
"cSpell.words": [
|
"cSpell.words": ["cakeday", "cakedays", "cooldown", "nextcord"]
|
||||||
"cakeday",
|
}
|
||||||
"cakedays"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
|
|||||||
+1
-1
@@ -9,4 +9,4 @@ COPY . /off-cooldown-bot
|
|||||||
WORKDIR /off-cooldown-bot
|
WORKDIR /off-cooldown-bot
|
||||||
RUN uv sync --frozen --no-dev
|
RUN uv sync --frozen --no-dev
|
||||||
|
|
||||||
CMD ["uv", "run", "./main.py"]
|
CMD ["uv", "run", "./off-cooldown-bot/main.py"]
|
||||||
|
|||||||
@@ -1,22 +0,0 @@
|
|||||||
"""
|
|
||||||
File contains classes defining the Hydra configuraton structure.
|
|
||||||
"""
|
|
||||||
from dataclasses import dataclass
|
|
||||||
|
|
||||||
|
|
||||||
@dataclass
|
|
||||||
class Params:
|
|
||||||
"""
|
|
||||||
Class defines the various configuration parameters.
|
|
||||||
"""
|
|
||||||
|
|
||||||
discord_token: str
|
|
||||||
|
|
||||||
|
|
||||||
@dataclass
|
|
||||||
class BotConfig:
|
|
||||||
"""
|
|
||||||
Class defines all configs required for Dakiny Bot.
|
|
||||||
"""
|
|
||||||
|
|
||||||
params: Params
|
|
||||||
@@ -8,8 +8,8 @@ import pathlib
|
|||||||
import nextcord
|
import nextcord
|
||||||
from nextcord.ext import commands
|
from nextcord.ext import commands
|
||||||
|
|
||||||
from logger import ocd_logger
|
from .logger import ocd_logger
|
||||||
from settings import settings
|
from .settings import settings
|
||||||
|
|
||||||
nextcord_logger = logging.getLogger("nextcord")
|
nextcord_logger = logging.getLogger("nextcord")
|
||||||
nextcord_logger.setLevel(logging.DEBUG)
|
nextcord_logger.setLevel(logging.DEBUG)
|
||||||
@@ -35,3 +35,7 @@ class Settings(YAMLWizard):
|
|||||||
|
|
||||||
|
|
||||||
settings = Settings.from_yaml_file(CONFIG_LOCATION)
|
settings = Settings.from_yaml_file(CONFIG_LOCATION)
|
||||||
|
|
||||||
|
# I'm not expecting a list to be returned.
|
||||||
|
if isinstance(settings, list):
|
||||||
|
settings = settings[0]
|
||||||
Reference in New Issue
Block a user