ci.py 文件源码

python
阅读 24 收藏 0 点赞 0 评论 0

项目:tuxbot-bot 作者: outout14 项目源码 文件源码
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)))
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号