from discord.ext import commands
import json
import random


with open("assets/json/questions.json") as data:
    data = json.load(data)
    dares = data["dares"]


class Dare(commands.Cog):
    def __init__(self, client):
        self.client = client

    @commands.command(aliases=["d"])
    async def dare(self, ctx):
        dare = random.choice(dares)
        await ctx.send(dare)


def setup(client):
    client.add_cog(Dare(client))

[((7, 11, 7, 26), 'json.load', 'json.load', ({(7, 21, 7, 25): 'data'}, {}), '(data)', False, 'import json\n'), ((15, 5, 15, 36), 'discord.ext.commands.command', 'commands.command', (), '', False, 'from discord.ext import commands\n'), ((17, 15, 17, 35), 'random.choice', 'random.choice', ({(17, 29, 17, 34): 'dares'}, {}), '(dares)', False, 'import random\n')]