Remove deprecated code

Remove `system_set` and `member_set` frrom system and member commands
This commit is contained in:
xBelladonna 2019-06-15 16:33:45 +09:30
parent d5e36d7f81
commit 39cb185cf3
2 changed files with 0 additions and 14 deletions

View file

@ -7,8 +7,6 @@ from pluralkit.errors import PluralKitError
async def member_root(ctx: CommandContext): async def member_root(ctx: CommandContext):
if ctx.match("new") or ctx.match("create") or ctx.match("add") or ctx.match("register"): if ctx.match("new") or ctx.match("create") or ctx.match("add") or ctx.match("register"):
await new_member(ctx) await new_member(ctx)
elif ctx.match("set"):
await member_set(ctx)
# TODO "pk;member list" # TODO "pk;member list"
elif not ctx.has_next(): elif not ctx.has_next():
raise CommandError("Must pass a subcommand. For a list of subcommands, type `pk;help member`.") raise CommandError("Must pass a subcommand. For a list of subcommands, type `pk;help member`.")
@ -81,11 +79,6 @@ async def new_member(ctx: CommandContext):
"Member \"{}\" (`{}`) registered! Type `pk;help member` for a list of commands to edit this member.".format(new_name, member.hid)) "Member \"{}\" (`{}`) registered! Type `pk;help member` for a list of commands to edit this member.".format(new_name, member.hid))
async def member_set(ctx: CommandContext):
raise CommandError(
"`pk;member set` has been retired. Please use the new member modifying commands. Type `pk;help member` for a list.")
async def member_name(ctx: CommandContext, member: Member): async def member_name(ctx: CommandContext, member: Member):
system = await ctx.ensure_system() system = await ctx.ensure_system()
new_name = ctx.pop_str(CommandError("You must pass a new member name.")) new_name = ctx.pop_str(CommandError("You must pass a new member name."))

View file

@ -38,8 +38,6 @@ async def system_root(ctx: CommandContext):
await system_frontpercent(ctx, await ctx.ensure_system()) await system_frontpercent(ctx, await ctx.ensure_system())
elif ctx.match("timezone") or ctx.match("tz"): elif ctx.match("timezone") or ctx.match("tz"):
await system_timezone(ctx) await system_timezone(ctx)
elif ctx.match("set"):
await system_set(ctx)
elif ctx.match("list") or ctx.match("members"): elif ctx.match("list") or ctx.match("members"):
await system_list(ctx, await ctx.ensure_system()) await system_list(ctx, await ctx.ensure_system())
elif not ctx.has_next(): elif not ctx.has_next():
@ -91,11 +89,6 @@ async def system_new(ctx: CommandContext):
await ctx.reply_ok("System registered! To begin adding members, use `pk;member new <name>`.") await ctx.reply_ok("System registered! To begin adding members, use `pk;member new <name>`.")
async def system_set(ctx: CommandContext):
raise CommandError(
"`pk;system set` has been retired. Please use the new system modifying commands. Type `pk;help system` for a list.")
async def system_name(ctx: CommandContext): async def system_name(ctx: CommandContext):
system = await ctx.ensure_system() system = await ctx.ensure_system()
new_name = ctx.remaining() or None new_name = ctx.remaining() or None