def __init__(self, client): self.client = client self.db_conn = dbconn() self.currency_name = "ZEN" self.count = 0 self.deck = ["D1","D2","D3","D4","D5","D6","D7","D8","D9","D10","DJ","DQ","DK"\ ,"C1","C2","C3","C4","C5","C6","C7","C8","C9","C10","CJ","CQ","CK"\ ,"H1","H2","H3","H4","H5","H6","H7","H8","H9","H10","HJ","HQ","HK"\ ,"S1","S2","S3","S4","S5","S6","S7","S8","S9","S10","SJ","SQ","SK" ]
def __init__(self, client): self.client = client self.db_conn = dbconn() self.guild = None self.currency_name = "ZEN" self.embed = None
def __init__(self, client): self.client = client self.db_conn = dbconn() self.currency_name = "ZEN" self.user_lock = []
import discord import os from cogs.db import dbconn from discord.ext import commands db_conn = dbconn() # To add command prefix client = commands.Bot(command_prefix='.') @client.event async def on_ready(): print("Bot Loaded") @client.event async def on_member_join(member: discord.Member): user = f'{member}' userId = f'<@!{str(member.id)}>' db_conn.dbconn_open() reg_role = db_conn.register_user(user, userId) for role in member.guild.roles: if role.name == reg_role: reg_role = role await member.add_roles(reg_role) db_conn.dbconn_close() print(f'{member} : {userId} has joined the server.') @client.event
def __init__(self, client): self.client = client self.db_conn = dbconn() self.embed = None