forgot some aiohttp stuff

This commit is contained in:
Brandon 2021-11-23 16:14:21 -05:00
parent beb2574b0d
commit ddc9823368
1 changed files with 10 additions and 0 deletions

View File

@ -16,6 +16,11 @@ from typing import Literal
import asyncio
import aiohttp
try:
from redbot import json # support of Draper's branch
except ImportError:
import json
from .discord_new_features import edit_role_icon
_ = Translator("PersonalRoles", __file__)
@ -49,6 +54,11 @@ class PersonalRoles(commands.Cog):
self.config.register_member(**default_member)
self.config.register_guild(**default_guild)
self.session = aiohttp.ClientSession(json_serialize=json.dumps)
def cog_unload(self):
self.bot.loop.create_task(self.session.close())
@commands.group()
@commands.guild_only()
@checks.bot_has_permissions(manage_roles=True)