diff --git a/dislocker.py b/dislocker.py index 1e363d7..739518b 100644 --- a/dislocker.py +++ b/dislocker.py @@ -42,8 +42,8 @@ class Database(): return 0 class Bot(discord.Client): - def db_connect(self, host, db, user, password): - self.db = psycopg2.connect(f"host={host} dbname={db} user={user} password={password}") + def db_connect(self, host, db, port, user, password): + self.db = psycopg2.connect(f"host={host} dbname={db} port={port} user={user} password={password}") async def on_ready(self): print("ログイン成功") @@ -148,5 +148,5 @@ intents = discord.Intents.default() intents.message_content = True bot = Bot(intents=intents) -bot.db_connect(db_config["host"], db_config["db"], db_config["username"], db_config["password"]) +bot.db_connect(db_config["host"], db_config["db"], db_config["port"], db_config["username"], db_config["password"]) bot.run(bot_config["token"]) \ No newline at end of file