Skip to content

Commit

Permalink
removing the poll command when the user invokes it so the channel isn…
Browse files Browse the repository at this point in the history
…'t littered with command calls (#336)
  • Loading branch information
modernNeo authored Dec 21, 2021
1 parent 521900c commit b4ef973
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions wall_e/src/resources/cogs/misc.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ async def poll(self, ctx, *questions):
)
if e_obj is not False:
await ctx.send(embed=e_obj)
await ctx.message.delete()
return
elif len(questions) == 1:
logger.info("[Misc poll()] yes/no poll being constructed.")
Expand All @@ -46,6 +47,7 @@ async def poll(self, ctx, *questions):
await post.add_reaction(u"\U0001F44D")
await post.add_reaction(u"\U0001F44E")
logger.info("[Misc poll()] yes/no poll constructed and sent to server.")
await ctx.message.delete()
return
if len(questions) == 2:
logger.info("[Misc poll()] poll with only 2 arguments detected.")
Expand All @@ -58,6 +60,7 @@ async def poll(self, ctx, *questions):
)
if e_obj is not False:
await ctx.send(embed=e_obj)
await ctx.message.delete()
return
elif len(questions) == 0:
logger.info("[Misc poll()] poll with no arguments detected.")
Expand All @@ -70,6 +73,7 @@ async def poll(self, ctx, *questions):
)
if e_obj is not False:
await ctx.send(embed=e_obj)
await ctx.message.delete()
return
else:
logger.info("[Misc poll()] multi-option poll being constructed.")
Expand All @@ -94,6 +98,7 @@ async def poll(self, ctx, *questions):
for i in range(0, options):
await poll_post.add_reaction(numbers_unicode[i])
logger.info("[Misc poll()] reactions added to multi-option poll message.")
await ctx.message.delete()

@commands.command()
async def urban(self, ctx, *arg):
Expand Down

0 comments on commit b4ef973

Please sign in to comment.