Skip to content

Commit

Permalink
add war user command + fix player lookup
Browse files Browse the repository at this point in the history
  • Loading branch information
MagicTheDev committed Dec 19, 2024
1 parent 9faee1b commit ddfc7f4
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion commands/player/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -600,7 +600,7 @@ async def detailed_player_board(bot: CustomClient, custom_player: StatsPlayer, s
if member is not None:
embed.set_footer(text=str(member), icon_url=member.display_avatar)

ban = await bot.banlist.find_one({"$and": [{"VillageTag": f"{player.tag}"}, {"server": server.id}]})
ban = await bot.banlist.find_one({"$and": [{"VillageTag": f"{player.tag}"}, {"server": server.id if server else None}]})

if ban is not None:
date = ban.get("DateCreated")
Expand Down
2 changes: 2 additions & 0 deletions commands/war/commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,14 @@
plan_text,
roster_embed,
)
from utility.discord_utils import user_command


class War(commands.Cog):
def __init__(self, bot: CustomClient):
self.bot = bot

@user_command()
@commands.slash_command(name='war')
async def war(self, ctx: disnake.ApplicationCommandInteraction):
pass
Expand Down
2 changes: 1 addition & 1 deletion discord/events.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ async def on_ready(self):
return

has_started = True
if self.bot._config.cluster_id == 1:
if self.bot._config.cluster_id <= 1:
await self.sync_patchable_commands()

if self.bot.user.public_flags.verified_bot:
Expand Down

0 comments on commit ddfc7f4

Please sign in to comment.