Made a couple of improvements to /guess
This commit is contained in:
@@ -45,6 +45,11 @@ class Guess(Cog):
|
||||
)
|
||||
return
|
||||
|
||||
if ctx.channel_id != user.event_channels[str(event._id)]:
|
||||
# TODO Make a nice message
|
||||
await ctx.respond("Usage outside own event channel is not allowed.", ephemeral=True)
|
||||
return
|
||||
|
||||
if answer.lower() != stage.answer.lower():
|
||||
# TODO Make a nice message
|
||||
# await ctx.respond("Provided answer is wrong.")
|
||||
@@ -67,7 +72,13 @@ class Guess(Cog):
|
||||
completed_event_ids=user.completed_event_ids,
|
||||
)
|
||||
|
||||
await ctx.respond("Event is completed.")
|
||||
await ctx.respond("Congratulations! You have completed the event!")
|
||||
|
||||
await self.bot.notify_admins(
|
||||
ctx.guild,
|
||||
guild,
|
||||
f"User **{ctx.author.display_name}** ({ctx.author.mention}) has completed the event",
|
||||
)
|
||||
return
|
||||
|
||||
next_stage: PycordEventStage = await self.bot.find_event_stage(next_stage_id)
|
||||
@@ -81,6 +92,12 @@ class Guess(Cog):
|
||||
|
||||
await user.set_event_stage(next_stage._id, cache=self.bot.cache)
|
||||
|
||||
await self.bot.notify_admins(
|
||||
ctx.guild,
|
||||
guild,
|
||||
f"User **{ctx.author.display_name}** ({ctx.author.mention}) has completed the stage {stage.sequence+1} of the event **{event.name}**.",
|
||||
)
|
||||
|
||||
|
||||
def setup(bot: PycordBot) -> None:
|
||||
bot.add_cog(Guess(bot))
|
||||
|
Reference in New Issue
Block a user