A-0.2 - Datenbankverbindung #35
@ -21,7 +21,7 @@ class Gismo(ApplicationABC):
|
||||
async def main(self):
|
||||
try:
|
||||
self._logger.trace(__name__, f'Try to start {BotService}')
|
||||
# await self._bot.start_async()
|
||||
await self._bot.start_async()
|
||||
except Exception as e:
|
||||
self._logger.error(__name__, 'Start failed', e)
|
||||
|
||||
|
@ -15,7 +15,7 @@ class DBContext(DatabaseContext):
|
||||
def connect(self, database_settings: DatabaseSettings):
|
||||
try:
|
||||
self._logger.debug(__name__, "Connecting to database")
|
||||
super(DatabaseContext, self).connect(database_settings)
|
||||
super(DBContext, self).connect(database_settings)
|
||||
self._logger.info(__name__, "Connected to database")
|
||||
except Exception as e:
|
||||
self._logger.fatal(__name__, "Connecting to database failed", e)
|
||||
|
@ -39,7 +39,7 @@ class User(TableABC):
|
||||
`DiscordId` INT(30) NOT NULL,
|
||||
`XP` INT(30) NOT NULL DEFAULT 0,
|
||||
`ServerId` INT(30),
|
||||
FOREIGN KEY (`UserId`) REFERENCES Server(`ServerId`),
|
||||
FOREIGN KEY (`UserId`) REFERENCES Servers(`ServerId`),
|
||||
PRIMARY KEY(`UserId`)
|
||||
);
|
||||
""")
|
||||
|
Reference in New Issue
Block a user