Browse Source

removed useless code

removed useless code
tags/v2.0.0
Roxie Gibson 5 years ago
parent
commit
c8004aac6f
1 changed files with 4 additions and 13 deletions
  1. +4
    -13
      roxbot/cogs/selfassign.py

+ 4
- 13
roxbot/cogs/selfassign.py View File

@@ -70,9 +70,9 @@ class SelfAssign():

@commands.guild_only()
@commands.command(pass_context=True)
async def iam(self, ctx, *, role: discord.Role = None):
async def iam(self, ctx, *, role: discord.Role):
"""
Self-assign yourself a role. Only one role at a time.
Self-assign yourself a role. Only one role at a time. # TODO: Experiment with special converters here.
Usage:
{command_prefix}iam [role]
Example:
@@ -80,11 +80,6 @@ class SelfAssign():
"""
settings = gs.get(ctx.guild)

if role is None:
# Hacky way to get the error I want
from inspect import Parameter
raise commands.MissingRequiredArgument(Parameter("Role", False))

if not settings.self_assign["enabled"]:
embed = discord.Embed(colour=roxbot.EmbedColours.pink, description="SelfAssignable roles are not enabled on this server")
return await ctx.send(embed=embed)
@@ -102,7 +97,7 @@ class SelfAssign():

@commands.guild_only()
@commands.command(pass_context=True)
async def iamn(self, ctx, *, role: discord.Role = None):
async def iamn(self, ctx, *, role: discord.Role):
"""
Remove a self-assigned role
Usage:
@@ -112,10 +107,6 @@ class SelfAssign():
"""
settings = gs.get(ctx.guild)

if role is None:
from inspect import Parameter
raise commands.MissingRequiredArgument(Parameter("role", False))

if not settings.self_assign["enabled"]:
embed = discord.Embed(colour=roxbot.EmbedColours.pink, description="SelfAssignable roles are not enabled on this server")
return await ctx.send(embed=embed)
@@ -132,4 +123,4 @@ class SelfAssign():


def setup(Bot):
Bot.add_cog(SelfAssign(Bot))
Bot.add_cog(SelfAssign(Bot))

Loading…
Cancel
Save