Skip to content

Commit

Permalink
disable v3 only commands
Browse files Browse the repository at this point in the history
  • Loading branch information
greeeen-dev committed Oct 9, 2024
1 parent e7b1a38 commit 9451101
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions bridge_revolt.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.')
Expand Down Expand Up @@ -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'
Expand Down Expand Up @@ -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']
Expand All @@ -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(
Expand Down

0 comments on commit 9451101

Please sign in to comment.