Making sure other people can't close help embed

pull/4/head
sgoudham 4 years ago
parent ff3f07ba9e
commit 3a6f6f702d

@ -261,6 +261,14 @@ class HelpMenu(menus.Menu):
@menus.button('\N{BLACK SQUARE FOR STOP}\ufe0f') @menus.button('\N{BLACK SQUARE FOR STOP}\ufe0f')
async def on_stop(self, payload): async def on_stop(self, payload):
# Simple check to make sure that the reaction is performed by the user
def check(m):
return m.author == payload.member
if not check(self.ctx):
return
else:
# Send the stop embed which shows that the help commands embed is no longer accessible # Send the stop embed which shows that the help commands embed is no longer accessible
stop = stop_embed(self) stop = stop_embed(self)
await self.message.edit(embed=stop) await self.message.edit(embed=stop)

Loading…
Cancel
Save