Skip to content

Commit 48fc7bc

Browse files
committed
fix notif in summoning helpers
1 parent e968bd8 commit 48fc7bc

File tree

3 files changed

+17
-5
lines changed

3 files changed

+17
-5
lines changed

modules/help_channels/commands/question.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,15 @@ def __init__(self, bot: discord.Bot):
2727

2828
@question.command(name="summon-helpers", description="Manually summon helpers")
2929
async def summon(self, inter: discord.ApplicationContext):
30-
await inter.response.send_message(view=SummonedHelpersView())
30+
msg = await inter.respond("Summoning helpers...")
31+
await msg.delete_original_response()
32+
await inter.channel.send(
33+
f"-# Helpers summoned in thread '{inter.channel.name}' (<@&{variables.helper!s}> <@&{variables.comm_helper_B!s}>)",
34+
allowed_mentions=discord.AllowedMentions(roles=True)
35+
)
36+
await inter.channel.send(
37+
view=SummonedHelpersView()
38+
)
3139
Log.info(f"User {inter.author.name} summoned helpers with a slash command")
3240

3341
@question.command(name="reset", description="Reset the original message and allow the user to summon helpers.")

modules/help_channels/components/buttons.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import discord
22
import variables
33
from modules.help_channels.res_thread import resolve_thread
4+
from asyncio import sleep
45

56
class SummonHelpersButton(discord.ui.Button):
67
def __init__(self, enabled = True):
@@ -33,10 +34,15 @@ async def callback(self, inter: discord.Interaction):
3334
return await inter.respond("**Please be patient!** It has not been long enough to summon helpers. Please wait a bit more before trying again.",ephemeral=True)
3435

3536
# Ping helpers
36-
await inter.respond(
37-
view=SummonedHelpersView(),
37+
msg = await inter.respond("Summoning helpers...")
38+
await msg.delete_original_response()
39+
await inter.channel.send(
40+
f"-# Helpers summoned in thread '{inter.channel.name}' (<@&{variables.helper!s}> <@&{variables.comm_helper_B!s}>)",
3841
allowed_mentions=discord.AllowedMentions(roles=True)
3942
)
43+
await inter.channel.send(
44+
view=SummonedHelpersView()
45+
)
4046

4147
await inter.respond("Done!",ephemeral=True)
4248

modules/help_channels/components/views.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,8 +120,6 @@ def __init__(self):
120120

121121
container.add_text("**I've summoned the helpers.** Remember that all helpers are volunteers, so please be respectful and remember that we all have a life outside of Discord.")
122122

123-
container.add_text(f"<@&{variables.helper!s}> <@&{variables.comm_helper_B!s}>")
124-
125123
self.add_item(container)
126124

127125
class ReminderMessageView(discord.ui.View):

0 commit comments

Comments
 (0)