Skip to content

Commit

Permalink
Merge pull request #160 from MiscGuild/dnkl-fix
Browse files Browse the repository at this point in the history
fix: dnkl_application given incorrect arguments
  • Loading branch information
Amxgh authored Dec 21, 2023
2 parents bd50cbe + abc4dc7 commit 4754989
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/func/String.py
Original file line number Diff line number Diff line change
Expand Up @@ -185,11 +185,12 @@ async def info(self):
async def dnkladd(self, ctx):
# start, end, reason
ign, uuid = await get_mojang_profile(self.string)
_, weekly_gexp = await get_player_gexp(uuid)
if not ign:
return unknown_ign_embed

# Ask DNKL application questions
embed = await dnkl_application(ign, uuid, ctx.channel, ctx.author)
embed = await dnkl_application(ign, uuid, ctx.channel, ctx.author, weekly_gexp)
dnkl_message = await bot.get_channel(dnkl_channel_id).send(embed=embed.set_author(name="Do-not-kick-list"))

# Check if user is already on DNKL
Expand Down
3 changes: 2 additions & 1 deletion src/utils/discord_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -553,7 +553,8 @@ async def create_transcript(channel: discord.TextChannel, limit: int = None):
return discord.File(BytesIO(transcript.encode()), filename=f"transcript-{channel.name}.html")


async def dnkl_application(ign: str, uuid: str, channel: discord.TextChannel, author: discord.User, weekly_gexp: int):
async def dnkl_application(ign: str, uuid: str, channel: discord.TextChannel, author: discord.User,
weekly_gexp: int = None):
YearView = discord.ui.View()
buttons = (("Approve", "DNKL_Approve", discord.enums.ButtonStyle.green, dnkl_approve),
("Deny", "DNKL_Deny", discord.enums.ButtonStyle.red, dnkl_deny),
Expand Down

0 comments on commit 4754989

Please sign in to comment.