From 9451101b49b1b65da5fd870fc1c9aaa5eb2e0d68 Mon Sep 17 00:00:00 2001 From: green <41323182+greeeen-dev@users.noreply.github.com> Date: Wed, 9 Oct 2024 21:21:08 +0200 Subject: [PATCH] disable v3 only commands --- bridge_revolt.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/bridge_revolt.py b/bridge_revolt.py index a43afdf..57da5cc 100644 --- a/bridge_revolt.py +++ b/bridge_revolt.py @@ -915,6 +915,9 @@ async def unbind(self, ctx, *, room=None): @rv_commands.command() async def invites(self, ctx, room): + if self.compatibility_mode: + return await ctx.send('You need Unifier v3 to use this command.') + room = room.lower() if not room in self.bot.bridge.rooms: return await ctx.send(f'This room does not exist. Run `{self.bot.command_prefix}rooms` for a list of rooms.') @@ -955,6 +958,9 @@ async def invites(self, ctx, room): @rv_commands.command(name='create-invite') async def create_invite(self, ctx, room, expiry='7d', max_usage='0'): + if self.compatibility_mode: + return await ctx.send('You need Unifier v3 to use this command.') + if max_usage == room: # revolt.py is weird max_usage = '0' @@ -998,6 +1004,9 @@ async def create_invite(self, ctx, room, expiry='7d', max_usage='0'): @rv_commands.command(name='delete-invite') async def delete_invite(self, ctx, invite): + if self.compatibility_mode: + return await ctx.send('You need Unifier v3 to use this command.') + invite = invite.lower() try: room = self.bot.bridge.get_invite(invite)['room'] @@ -1016,6 +1025,9 @@ async def delete_invite(self, ctx, invite): @rv_commands.command() async def disband(self, ctx, room): + if self.compatibility_mode: + return await ctx.send('You need Unifier v3 to use this command.') + room = room.lower() if not room in self.bot.bridge.rooms: return await ctx.send(