From 3f0919d2a824dc76c1840ae4ef12bd4238746b5e Mon Sep 17 00:00:00 2001 From: annihilator708 Date: Mon, 21 May 2018 04:56:02 +0200 Subject: [PATCH] Remove missing util from sebisauce and replaced it with a static fix --- src/cogs/fun.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/cogs/fun.py b/src/cogs/fun.py index d2295ac..3df55ca 100644 --- a/src/cogs/fun.py +++ b/src/cogs/fun.py @@ -4,6 +4,7 @@ from discord.ext import commands import discord import random +import aiohttp class Fun: """ @@ -22,7 +23,10 @@ class Fun: - sebisauce """ await ctx.trigger_typing() - source = await self.bot.brequest.aio_json('http://ikbengeslaagd.com/API/sebisauce.json') + url = 'http://ikbengeslaagd.com/API/sebisauce.json' + async with aiohttp.ClientSession() as session: + async with session.get(url) as response: + source = await response.json(encoding='utf8') total_sebi = 0 for key in dict.keys(source):