Skip to content

Commit f3e5630

Browse files
authored
Update general_suggest.py
1 parent 89dd001 commit f3e5630

File tree

1 file changed

+19
-6
lines changed

1 file changed

+19
-6
lines changed

src/zorak/cogs/general/general_suggest.py

Lines changed: 19 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,25 @@ async def suggest(self, ctx, question):
2727
logger.info("%s used the %s command."
2828
, ctx.author.name
2929
, ctx.command)
30-
31-
embed = discord.Embed(description=question)
32-
embed.set_author(name=f"Suggestion by {ctx.author.name}")
33-
msg = await ctx.send(embed=embed)
34-
await msg.add_reaction("👍")
35-
await msg.add_reaction("👎")
30+
31+
'''
32+
33+
'''
34+
embed = discord.Embed(description= question)
35+
embed.set_author(name= f"Suggestion by user {ctx.author.name}")
36+
error_embed = discord.Embed(title= "**Oops...**", description= "Slow down, please only use /suggest in #📎suggestions!", color= discord.Color.red())
37+
38+
39+
'''
40+
If the channel name/ID of the command matches with the current
41+
channel, the suggestion will be posted. If not, an error message will occur.
42+
'''
43+
if ctx.channel.name == "📎suggestions" or ctx.channel_id == "962415552737996800":
44+
msg = await ctx.respond(embed=embed)
45+
await msg.add_reaction("👍")
46+
await msg.add_reaction("👎")
47+
else:
48+
await ctx.respond(embed=error_embed)
3649

3750

3851
def setup(bot):

0 commit comments

Comments
 (0)