Exemplo n.º 1
0
from keep_alive import keep_alive
from discord.ext.commands import Bot
from random import shuffle
from kana_lists import katakana_list
from kana_lists import hiragana_list
from kana_lists import en_katakana_list
from kanji_lists import kanji_list_level_one

TOKEN = TOKEN HERE AS STRING
BOT_PREFIX = '!J'

client = Bot(command_prefix=BOT_PREFIX)  # discord.Client()

client.mistakes = 0  # Number of mistakes the user makes
client.kana_selection = '0'  # Stores the kana used for the question
client.choice = -1  # Keeps track of whether hiragana or english input is being taken
client.katakana_order = False  # Makes it so if someone types 0 or 1 it doesn't automatically start a katakana quiz
client.test_taker = client.user  # So the bot only takes responses from one person
client.kamoshirenai = False  # used to see if the message is at least contained within a list
client.chart = False  # To check if a chart will be uploaded
client.first_run = True  # To check if it's the first run of a quiz
completed_list = []
client.list_length = len(katakana_list) - 1  # To store the length of the kana list
client.kanji_one_list_length = len(kanji_list_level_one) - 1  # To store the length of the first kanji list


@client.event
async def on_ready():
    print('Logged in as')
    print(client.user.name)
    print(client.user.id)