16
16
17
17
from .discord_py_future import edit_role_icon
18
18
19
- try :
20
- from redbot import json # support of Draper's branch
21
- except ImportError :
22
- import json
23
-
24
19
_ = Translator ("PersonalRoles" , __file__ )
25
20
26
21
@@ -47,7 +42,7 @@ class PersonalRoles(commands.Cog):
47
42
# noinspection PyMissingConstructor
48
43
def __init__ (self , bot ):
49
44
self .bot = bot
50
- self .session = aiohttp .ClientSession (json_serialize = json . dumps )
45
+ self .session = aiohttp .ClientSession ()
51
46
self .config = Config .get_conf (self , identifier = 0x3D86BBD3E2B744AE8AA8B5D986EB4DD8 )
52
47
default_member = {"role" : None }
53
48
default_guild = {"blacklist" : [], "role_persistence" : True }
@@ -303,8 +298,6 @@ async def icon_emoji(self, ctx, *, emoji: Union[discord.Emoji, discord.PartialEm
303
298
await ctx .send (
304
299
chat .error (_ ("Unable to edit role.\n Role must be lower than my top role" ))
305
300
)
306
- except discord .InvalidArgument :
307
- await ctx .send (chat .error (_ ("This image type is unsupported, or link is incorrect" )))
308
301
except discord .HTTPException as e :
309
302
ctx .command .reset_cooldown (ctx )
310
303
await ctx .send (chat .error (_ ("Unable to edit role: {}" ).format (e )))
@@ -341,8 +334,6 @@ async def icon_image(self, ctx, *, url: str = None):
341
334
await ctx .send (
342
335
chat .error (_ ("Unable to edit role.\n Role must be lower than my top role" ))
343
336
)
344
- except discord .InvalidArgument :
345
- await ctx .send (chat .error (_ ("This image type is unsupported, or link is incorrect" )))
346
337
except discord .HTTPException as e :
347
338
ctx .command .reset_cooldown (ctx )
348
339
await ctx .send (chat .error (_ ("Unable to edit role: {}" ).format (e )))
0 commit comments