Polecenie przechowywania w niezbędnych
#create a json file (example: store.json)
@bot.command()
@commands.has_permissions(administrator=True)
async def store(ctx):
with open('store.json') as json_file:
data = json.load(json_file)
store = {"channel_id" : ctx.channel.id, "guild_id" : ctx.guild.id}
data.append(store)
with open('store.json', 'w') as f:
json.dump(data, f, indent=4)
Hunter 87