Skip to content
Snippets Groups Projects
Commit 3ac4e51f authored by Reviath's avatar Reviath
Browse files

Fixed welcome and leave channel commands.

parent 8bf131f9
No related branches found
No related tags found
No related merge requests found
......@@ -205,7 +205,10 @@ class Moderation(commands.Cog):
mycursor.execute(sql, val)
mydb.commit()
await ctx.send(f'Set new welcome.channel as {channel.mention}.')
else:
if channel == None:
await ctx.send("You need to specify the channel.")
return
else:
sql = "INSERT INTO welcomech (chid, serverid) VALUES (%s, %s)"
val = (channel.id, ctx.guild.id)
......@@ -311,6 +314,10 @@ class Moderation(commands.Cog):
mycursor.execute(sql, val)
mydb.commit()
await ctx.send(f'Setting new leave channel as {channel.mention}.')
else:
if channel == None:
await ctx.send("You need to specify the channel.")
return
else:
sql = "INSERT INTO leavech (chid, serverid) VALUES (%s, %s)"
val = (channel.id, ctx.guild.id)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment