@mondash

RuntimeWarning: Enable tracemalloc to get the object allocation traceback?

import discord
from discord.ext import commands
from config import data
import clashroyale



def chests(text):
    d = {}
    text = text.replace("<","{")
    text = text.replace(">","}")
    text = text.replace("Refreshable","'Refreshable'")
    text = eval(text[:text.index(']')+1])
    for i in text:
        d[i['Refreshable']['index']] = i['Refreshable']['name']
    return d



bot = commands.Bot(command_prefix = data['prefix'])
client_cr = clashroyale.official_api.Client(data['token_cr'])



@bot.command()
async def chests(ctx, arg):
    await ctx.send(chests(client_cr.get_player_chests(arg)))



bot.run(data['token'])

Вроде await писал, а все равно пишет вас невер авоитед
622a31e6c40d4308115429.png
Еще вот такое бот выдает
622a326e0e456517102338.png
  • Вопрос задан
  • 114 просмотров
Пригласить эксперта
Ваш ответ на вопрос

Войдите, чтобы написать ответ

Войти через центр авторизации
Похожие вопросы