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 писал, а все равно пишет вас невер авоитед
Еще вот такое бот выдает