Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
Signed-off-by: Allen95Wei <allen95wei@gmail.com>
  • Loading branch information
Alllen95Wei committed Dec 21, 2024
1 parent 365ebe0 commit 4b17f9a
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions cogs/misfit_only.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ async def allow_callback(self, button, interaction: discord.Interaction):
if not self.timed_out_member.timed_out:
embed = Embed(
title="錯誤:使用者未被禁言",
description=f"{self.timed_out_member.mention}似乎已被解除禁言。",
description=f"{self.timed_out_member.mention} 似乎已被解除禁言。",
color=error_color,
)
else:
Expand All @@ -110,21 +110,22 @@ async def allow_callback(self, button, interaction: discord.Interaction):
)
embed = Embed(
title="已解除禁言",
description=f"{interaction.user.mention}已解除了{self.timed_out_member.mention}的禁言。",
description=f"{interaction.user.mention} 已解除了 {self.timed_out_member.mention} 的禁言。",
color=default_color,
)
embed.add_field(name="申訴內容", value=self.appeal_content)
notify_embed = Embed(
title="好消息:申訴通過!",
description=f"你的申訴經過{interaction.user.mention}的許可,因此你的禁言已解除。",
description=f"你的申訴經過 {interaction.user.mention} 的許可,因此你的禁言已解除。",
color=default_color,
)
await self.timed_out_member.send(embed=notify_embed)
await interaction.edit_original_response(
embed=embed,
self.disable_all_items()
await interaction.edit_original_response(embed=embed)
await interaction.followup.send(
view=Misfit.FeedbackView(
self.outer_instance, self.timed_out_member, interaction.user
),
)
)

@ui.button(label="未通過,繼續禁言", style=ButtonStyle.red)
Expand All @@ -133,22 +134,23 @@ async def disallow_callback(self, button, interaction: discord.Interaction):
if not self.timed_out_member.timed_out:
embed = Embed(
title="錯誤:使用者未被禁言",
description=f"{self.timed_out_member.mention}似乎已被解除禁言。",
description=f"{self.timed_out_member.mention} 似乎已被解除禁言。",
color=error_color,
)
else:
embed = Embed(
title="已退回申訴",
description=f"{interaction.user.mention}已退回了{self.timed_out_member.mention}的申訴。禁言將繼續。",
description=f"{interaction.user.mention} 已退回了 {self.timed_out_member.mention} 的申訴。禁言將繼續。",
color=default_color,
)
embed.add_field(name="申訴內容", value=self.appeal_content)
notify_embed = Embed(
title="申訴未通過",
description=f"你的申訴經過{interaction.user.mention}檢查後遭到拒絕,因此你的禁言將繼續。",
description=f"你的申訴經過 {interaction.user.mention} 檢查後遭到拒絕,因此你的禁言將繼續。",
color=default_color,
)
await self.timed_out_member.send(embed=notify_embed)
self.disable_all_items()
await interaction.edit_original_response(embed=embed)
await interaction.followup.send(
view=Misfit.FeedbackView(
Expand All @@ -170,7 +172,6 @@ def __init__(

@ui.button(label="提供回應", style=ButtonStyle.blurple, emoji="🗨️")
async def btn_callback(self, button, interaction: discord.Interaction):
await interaction.response.defer()
await interaction.response.send_modal(
Misfit.FeedbackWindow(
self.outer_instance,
Expand Down Expand Up @@ -216,8 +217,7 @@ async def callback(self, interaction: Interaction):
color=default_color,
)
embed.add_field(name="你的回應", value=provided_reason)
await interaction.edit_original_response(view=None)
await interaction.followup.send(embed=embed)
await interaction.edit_original_response(embed=embed, view=None)
response_embed = Embed(
title="管理員提供了回應",
description=f"{interaction.user.mention}回應了以下內容。",
Expand Down

0 comments on commit 4b17f9a

Please sign in to comment.