Adding bot permissions to the interactive commands

pull/8/head
sgoudham 4 years ago
parent e15c7a33fe
commit f869789a94

@ -4,7 +4,7 @@ from contextlib import closing
from discord import Colour, Embed, Member from discord import Colour, Embed, Member
from discord.ext import commands from discord.ext import commands
from discord.ext.commands import cooldown, command, BucketType from discord.ext.commands import cooldown, command, BucketType, bot_has_permissions
import db import db
from settings import colour_list from settings import colour_list
@ -33,6 +33,7 @@ class Interactive(commands.Cog):
print(f"{self.__class__.__name__} Cog has been loaded\n-----") print(f"{self.__class__.__name__} Cog has been loaded\n-----")
@command(name="kiss", aliases=["Kiss"]) @command(name="kiss", aliases=["Kiss"])
@bot_has_permissions(embed_links=True)
@cooldown(1, 1, BucketType.user) @cooldown(1, 1, BucketType.user)
async def kiss(self, ctx, member: Member): async def kiss(self, ctx, member: Member):
"""Kiss your Partner""" """Kiss your Partner"""
@ -99,6 +100,7 @@ class Interactive(commands.Cog):
print(e) print(e)
@command(name="cuddle", aliases=["Cuddle"]) @command(name="cuddle", aliases=["Cuddle"])
@bot_has_permissions(embed_links=True)
@cooldown(1, 1, BucketType.user) @cooldown(1, 1, BucketType.user)
async def cuddle(self, ctx, member: Member): async def cuddle(self, ctx, member: Member):
"""Cuddle your Partner""" """Cuddle your Partner"""
@ -165,6 +167,7 @@ class Interactive(commands.Cog):
print(e) print(e)
@command(name="kill", aliases=["Kill"]) @command(name="kill", aliases=["Kill"])
@bot_has_permissions(embed_links=True)
@cooldown(1, 1, BucketType.user) @cooldown(1, 1, BucketType.user)
async def kill(self, ctx, member: Member): async def kill(self, ctx, member: Member):
"""Kill a Member""" """Kill a Member"""
@ -200,6 +203,7 @@ class Interactive(commands.Cog):
print(e) print(e)
@command(name="slap", aliases=["Slap"]) @command(name="slap", aliases=["Slap"])
@bot_has_permissions(embed_links=True)
@cooldown(1, 1, BucketType.user) @cooldown(1, 1, BucketType.user)
async def slap(self, ctx, member: Member): async def slap(self, ctx, member: Member):
"""Slap a Member""" """Slap a Member"""
@ -235,6 +239,7 @@ class Interactive(commands.Cog):
print(e) print(e)
@command(name="pat", aliases=["Pat"]) @command(name="pat", aliases=["Pat"])
@bot_has_permissions(embed_links=True)
@cooldown(1, 1, BucketType.user) @cooldown(1, 1, BucketType.user)
async def pat(self, ctx, member: Member): async def pat(self, ctx, member: Member):
"""Pat a Member""" """Pat a Member"""
@ -270,6 +275,7 @@ class Interactive(commands.Cog):
print(e) print(e)
@command(name="lemon", aliases=["Lemon"]) @command(name="lemon", aliases=["Lemon"])
@bot_has_permissions(embed_links=True)
@cooldown(1, 1, BucketType.user) @cooldown(1, 1, BucketType.user)
async def lemon(self, ctx, member: Member): async def lemon(self, ctx, member: Member):
"""Give Lemon to Member""" """Give Lemon to Member"""
@ -304,6 +310,7 @@ class Interactive(commands.Cog):
print(e) print(e)
@command(name="choke", aliases=["Choke"]) @command(name="choke", aliases=["Choke"])
@bot_has_permissions(embed_links=True)
@cooldown(1, 1, BucketType.user) @cooldown(1, 1, BucketType.user)
async def choke(self, ctx, member: Member): async def choke(self, ctx, member: Member):
"""Choke a Member""" """Choke a Member"""
@ -338,6 +345,7 @@ class Interactive(commands.Cog):
print(e) print(e)
@command(name="hug", aliases=["Hug"]) @command(name="hug", aliases=["Hug"])
@bot_has_permissions(embed_links=True)
@cooldown(1, 1, BucketType.user) @cooldown(1, 1, BucketType.user)
async def hug(self, ctx, member: Member): async def hug(self, ctx, member: Member):
"""Hug a Member""" """Hug a Member"""

Loading…
Cancel
Save