[V3 Otherbot] Fix pingrole clearing

This commit is contained in:
aikaterna
2018-09-01 18:06:28 -07:00
committed by GitHub
parent 45b1e2f83a
commit e610c32559

View File

@@ -28,7 +28,7 @@ class Otherbot:
async def pingrole(self, ctx, role_name: discord.Role = None):
"""Sets the role to use for pinging. Leave blank to reset it."""
if not role_name:
await self.config.guild(ctx.guild).ping()
await self.config.guild(ctx.guild).ping.set(None)
return await ctx.send("Ping role cleared.")
await self.config.guild(ctx.guild).ping.set(role_name.id)
pingrole_id = await self.config.guild(ctx.guild).ping()