From a81327a6806862ed4432f9bb36e21abab1fb5a13 Mon Sep 17 00:00:00 2001 From: suti7yk5032 Date: Wed, 5 Jun 2024 11:27:57 +0900 Subject: [PATCH] =?UTF-8?q?=E3=83=87=E3=83=BC=E3=82=BF=E3=83=99=E3=83=BC?= =?UTF-8?q?=E3=82=B9=E3=81=B8=E3=81=AE=E6=8E=A5=E7=B6=9A=E3=83=90=E3=82=B0?= =?UTF-8?q?=E3=82=92=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- dislocker.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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