forked from sh-edraft.de/sh_discord_bot
Added deploy command
This commit is contained in:
@@ -14,6 +14,7 @@ class BotSettings(ConfigurationModelABC):
|
||||
|
||||
self._servers: List[ServerSettings] = List()
|
||||
self._technicians: list[int] = []
|
||||
self._deploy_file_path = './'
|
||||
|
||||
@property
|
||||
def servers(self) -> List[ServerSettings]:
|
||||
@@ -23,10 +24,16 @@ class BotSettings(ConfigurationModelABC):
|
||||
def technicians(self) -> list[int]:
|
||||
return self._technicians
|
||||
|
||||
@property
|
||||
def deploy_file_path(self) -> str:
|
||||
return self._deploy_file_path
|
||||
|
||||
def from_dict(self, settings: dict):
|
||||
try:
|
||||
self._technicians = settings["Technicians"]
|
||||
self._deploy_file_path = settings["DeployFilesPath"]
|
||||
settings.pop("Technicians")
|
||||
settings.pop("DeployFilesPath")
|
||||
servers = List(ServerSettings)
|
||||
for s in settings:
|
||||
st = ServerSettings()
|
||||
|
@@ -96,7 +96,7 @@ class MessageService(MessageServiceABC):
|
||||
self._logger.error(__name__, f'Send message to channel {ctx.channel.id} failed', e)
|
||||
else:
|
||||
self._logger.info(__name__, f'Sent message to channel {ctx.channel.id}')
|
||||
if not without_tracking:
|
||||
if not without_tracking and ctx.guild is not None:
|
||||
self._clients.append_sent_message_count(self._bot.user.id, ctx.guild.id, 1)
|
||||
self._db.save_changes()
|
||||
|
||||
|
Reference in New Issue
Block a user