def ci_register(self, ctx):
cursor.execute("""SELECT id, userid FROM users WHERE userid=?""", (ctx.message.author.id,))
existansw = cursor.fetchone()
if existansw != None:
await ctx.send("Mais tu as déja une carte d'identité ! u_u")
else:
date = datetime.datetime.now()
nd = str(date.day)
nd += "-"
nd += str(date.month)
nd += "-"
nd += str(date.year)
cursor.execute("""INSERT INTO users(userid, username, useravatar, userbirth, cidate, cibureau) VALUES(?, ?, ?, ?, ?, ?)""", (ctx.message.author.id, ctx.message.author.name, ctx.message.author.avatar_url, ctx.message.author.created_at, nd, str(ctx.message.guild.name)))
conn.commit()
await ctx.send(":clap: Bievenue à toi {} dans le communisme {} ! Fait ``.ci`` pour plus d'informations !".format(ctx.message.author.name, str(ctx.message.guild.name)))
评论列表
文章目录