mirror of
https://github.com/RYGhub/royalnet.git
synced 2024-11-23 19:44:20 +00:00
Here is the problem.
This commit is contained in:
parent
526a2a493a
commit
c907422156
2 changed files with 2 additions and 1 deletions
|
@ -15,7 +15,7 @@ commands = [PingCommand, ShipCommand, SmecdsCommand, ColorCommand, CiaoruoziComm
|
||||||
|
|
||||||
master = RoyalnetServer("localhost", 1234, "sas")
|
master = RoyalnetServer("localhost", 1234, "sas")
|
||||||
tg_bot = TelegramBot(os.environ["TG_AK"], "localhost:1234", "sas", commands, os.environ["DB_PATH"], Royal, Telegram, "tg_id", error_command=ErrorHandlerCommand)
|
tg_bot = TelegramBot(os.environ["TG_AK"], "localhost:1234", "sas", commands, os.environ["DB_PATH"], Royal, Telegram, "tg_id", error_command=ErrorHandlerCommand)
|
||||||
ds_bot = DiscordBot(os.environ["DS_AK"], "localhost:1234", "sas", commands, os.environ["DB_PATH"], Royal, Discord, "discord_ig", error_command=ErrorHandlerCommand)
|
ds_bot = DiscordBot(os.environ["DS_AK"], "localhost:1234", "sas", commands, os.environ["DB_PATH"], Royal, Discord, "discord_id", error_command=ErrorHandlerCommand)
|
||||||
loop.create_task(master.run())
|
loop.create_task(master.run())
|
||||||
loop.create_task(tg_bot.run())
|
loop.create_task(tg_bot.run())
|
||||||
print("Commands enabled:")
|
print("Commands enabled:")
|
||||||
|
|
|
@ -25,6 +25,7 @@ class Alchemy:
|
||||||
self.__getattribute__(name)
|
self.__getattribute__(name)
|
||||||
except AttributeError:
|
except AttributeError:
|
||||||
# Actually the intended result
|
# Actually the intended result
|
||||||
|
# TODO: here is the problem!
|
||||||
self.__setattr__(name, type(name, (self.Base,), cdj(table)))
|
self.__setattr__(name, type(name, (self.Base,), cdj(table)))
|
||||||
else:
|
else:
|
||||||
raise NameError(f"{name} is a reserved name and can't be used as a table name")
|
raise NameError(f"{name} is a reserved name and can't be used as a table name")
|
||||||
|
|
Loading…
Reference in a new issue