Compare commits
No commits in common. "ace0af03d63bee710745f618d5bb9eabaab53802" and "20d9d1506388bb71594613d77c07bc95453a9d10" have entirely different histories.
ace0af03d6
...
20d9d15063
2 changed files with 14 additions and 0 deletions
5
.gitignore
vendored
5
.gitignore
vendored
|
@ -160,5 +160,10 @@ cython_debug/
|
||||||
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
|
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
|
||||||
#.idea/
|
#.idea/
|
||||||
|
|
||||||
|
<<<<<<< HEAD
|
||||||
|
config/*
|
||||||
|
db/*
|
||||||
|
=======
|
||||||
config/
|
config/
|
||||||
db/
|
db/
|
||||||
|
>>>>>>> for_psql
|
||||||
|
|
|
@ -1,8 +1,12 @@
|
||||||
import json
|
import json
|
||||||
import discord
|
import discord
|
||||||
import os
|
import os
|
||||||
|
<<<<<<< HEAD
|
||||||
|
import sqlite3
|
||||||
|
=======
|
||||||
import psycopg2
|
import psycopg2
|
||||||
import datetime
|
import datetime
|
||||||
|
>>>>>>> for_psql
|
||||||
|
|
||||||
class Database():
|
class Database():
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
|
@ -41,6 +45,10 @@ class Database():
|
||||||
elif result[0][1] == username and result[0][2] == password:
|
elif result[0][1] == username and result[0][2] == password:
|
||||||
return 0
|
return 0
|
||||||
|
|
||||||
|
<<<<<<< HEAD
|
||||||
|
|
||||||
|
cert = Cert()
|
||||||
|
=======
|
||||||
class Bot(discord.Client):
|
class Bot(discord.Client):
|
||||||
def db_connect(self, host, db, user, password):
|
def db_connect(self, host, db, user, password):
|
||||||
self.db = psycopg2.connect(f"host={host} dbname={db} user={user} password={password}")
|
self.db = psycopg2.connect(f"host={host} dbname={db} user={user} password={password}")
|
||||||
|
@ -73,6 +81,7 @@ class Bot(discord.Client):
|
||||||
await message.channel.send("パソコンの台数が\n# だめです")
|
await message.channel.send("パソコンの台数が\n# だめです")
|
||||||
else:
|
else:
|
||||||
await message.channel.send("構文が不正です。")
|
await message.channel.send("構文が不正です。")
|
||||||
|
>>>>>>> for_psql
|
||||||
|
|
||||||
elif len(msg_split) >= 4:
|
elif len(msg_split) >= 4:
|
||||||
if msg_split[1].isdigit() and msg_split[2].isdigit():
|
if msg_split[1].isdigit() and msg_split[2].isdigit():
|
||||||
|
|
Loading…
Reference in a new issue