Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import json
- with open('data.json',"r") as f:
- data = json.load(f)
- data["Name"].append("John")
- with open("data.json", "w") as outfile:
- json.dump(data, outfile)
- @bot.command()
- async def guilds(ctx):
- with open("server.json", "r") as f:
- data = json.load(f)
- data["Name"].append(ctx.guild.name)
- with open("server.json", "w") as f:
- json.dump(data, f)
Advertisement
Add Comment
Please, Sign In to add comment