diff --git a/cogs/fun.py b/cogs/fun.py index 377d248..7e3a51b 100644 --- a/cogs/fun.py +++ b/cogs/fun.py @@ -40,9 +40,9 @@ async def funfact_cmd(interaction): @discohook.command.slash('randomgif', description='Get a free cool gif from my gifs.') async def randomgif_cmd(interaction): await interaction.response.defer() - async with open("data/gifs.json", "r") as data: + with open("data/gifs.json", "rt") as data: gifs = json.load(data) - await interaction.response.followup(random.choice(gifs) + "\n **heres ur tuff gif**") + await interaction.response.followup(random.choice(gifs) + "\n **heres ur tuff gif**") @discohook.command.slash('dice', description="roll a dice using Discord's roll a dice system.", options=[ discohook.Option.integer('dice_num', "The number of dice", required=True, max_value=10, min_value=1),