Skip to content

Commit

Permalink
fix: wrong type for searching for the right server
Browse files Browse the repository at this point in the history
  • Loading branch information
ToasterUwU committed Apr 23, 2024
1 parent 8b30642 commit 9ea1c7e
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions cogs/owner.py
Original file line number Diff line number Diff line change
Expand Up @@ -319,8 +319,10 @@ async def refuse_service(self, interaction: nextcord.Interaction, server_id: str
if not server_id.isnumeric():
await interaction.send("Server ID is not a number")
return
else:
guild_id = int(server_id)

server = nextcord.utils.get(self.bot.guilds, id=server_id)
server = nextcord.utils.get(self.bot.guilds, id=guild_id)
if server is None:
await interaction.send("Bot isnt on the Server")
return
Expand All @@ -343,8 +345,10 @@ async def setop_refusing(self, interaction: nextcord.Interaction, server_id: str
if not server_id.isnumeric():
await interaction.send("Server ID is not a number")
return
else:
guild_id = int(server_id)

server = nextcord.utils.get(self.bot.guilds, id=server_id)
server = nextcord.utils.get(self.bot.guilds, id=guild_id)
if server is None:
await interaction.send("Bot isnt on the Server")
return
Expand Down

0 comments on commit 9ea1c7e

Please sign in to comment.