diff --git a/cogs/Embeds.py b/cogs/Embeds.py index 0a6661c6..6cbfa81d 100644 --- a/cogs/Embeds.py +++ b/cogs/Embeds.py @@ -6,7 +6,7 @@ import discord from discord.ext import commands from discord.ext.commands import BucketType, cooldown -import Config +import settings # Set up the Cog @@ -24,7 +24,7 @@ class Embeds(commands.Cog): try: # If the channel that the command has been sent is in the list of accepted channels - if str(ctx.channel) in Config.channels: + if str(ctx.channel) in settings.channels: # Open the file containing the kissing gifs with open('images/FunCommands/kissing.txt') as file: @@ -39,7 +39,7 @@ class Embeds(commands.Cog): # Set up the embed to display a random kissing gif embed = discord.Embed( title=f" | **{member.display_name}** kissed **{target.display_name}**", - colour=discord.Colour(int(random.choice(Config.colour_list)))) + colour=discord.Colour(int(random.choice(settings.colour_list)))) embed.set_image(url=random.choice(kissing_array)) embed.set_footer(text=f"Requested by {member}", icon_url='{}'.format(userAvatar)) embed.timestamp = datetime.datetime.utcnow() @@ -70,7 +70,7 @@ class Embeds(commands.Cog): try: # If the channel that the command has been sent is in the list of accepted channels - if str(ctx.channel) in Config.channels: + if str(ctx.channel) in settings.channels: # Open the file containing the killing gifs with open('images/FunCommands/killing.txt') as file: @@ -85,7 +85,7 @@ class Embeds(commands.Cog): # Set up the embed to display a random killing gif embed = discord.Embed( title=f"<:monkaW:718960264896184380> <:monkaW:718960264896184380> | **{member.display_name}** killed **{target.display_name}**", - colour=discord.Colour(int(random.choice(Config.colour_list)))) + colour=discord.Colour(int(random.choice(settings.colour_list)))) embed.set_image(url=random.choice(killing_array)) embed.set_footer(text=f"Requested by {member}", icon_url='{}'.format(userAvatar)) embed.timestamp = datetime.datetime.utcnow() @@ -116,7 +116,7 @@ class Embeds(commands.Cog): try: # If the channel that the command has been sent is in the list of accepted channels - if str(ctx.channel) in Config.channels: + if str(ctx.channel) in settings.channels: # Open the file containing the cuddling gifs with open('images/FunCommands/cuddling.txt') as file: @@ -131,7 +131,7 @@ class Embeds(commands.Cog): # Set up the embed to display a random cuddling gif embed = discord.Embed( title=f"<:blushlook1:677310734123663363> <:blushlook2:679524467248201769> | **{member.display_name}** cuddled **{target.display_name}**", - colour=discord.Colour(int(random.choice(Config.colour_list)))) + colour=discord.Colour(int(random.choice(settings.colour_list)))) embed.set_image(url=random.choice(cuddling_array)) embed.set_footer(text=f"Requested by {member}", icon_url='{}'.format(userAvatar)) embed.timestamp = datetime.datetime.utcnow() @@ -162,7 +162,7 @@ class Embeds(commands.Cog): try: # If the channel that the command has been sent is in the list of accepted channels - if str(ctx.channel) in Config.channels: + if str(ctx.channel) in settings.channels: # Open the file containing the cuddling gifs with open('images/FunCommands/slapping.txt') as file: @@ -177,7 +177,7 @@ class Embeds(commands.Cog): # Set up the embed to display a random slapping gif embed = discord.Embed( title=f"<:baka:718942872061083678> <:baka:718942872061083678> | **{member.display_name}** slapped **{target.display_name}**", - colour=discord.Colour(int(random.choice(Config.colour_list)))) + colour=discord.Colour(int(random.choice(settings.colour_list)))) embed.set_image(url=random.choice(slapping_array)) embed.set_footer(text=f"Requested by {member}", icon_url='{}'.format(userAvatar)) embed.timestamp = datetime.datetime.utcnow() @@ -208,7 +208,7 @@ class Embeds(commands.Cog): try: # If the channel that the command has been sent is in the list of accepted channels - if str(ctx.channel) in Config.channels: + if str(ctx.channel) in settings.channels: # Open the file containing the patting gifs with open('images/FunCommands/patting.txt') as file: @@ -223,7 +223,7 @@ class Embeds(commands.Cog): # Set up the embed to display a random patting gif embed = discord.Embed( title=f":pleading_face: :pleading_face: | **{member.display_name}** patted **{target.display_name}**", - colour=discord.Colour(int(random.choice(Config.colour_list)))) + colour=discord.Colour(int(random.choice(settings.colour_list)))) embed.set_image(url=random.choice(patting_array)) embed.set_footer(text=f"Requested by {member}", icon_url='{}'.format(userAvatar)) embed.timestamp = datetime.datetime.utcnow() @@ -258,7 +258,7 @@ class Embeds(commands.Cog): try: # If the channel that the command has been sent is in the list of accepted channels - if str(ctx.channel) in Config.channels: + if str(ctx.channel) in settings.channels: # Set member as the author member = ctx.message.author @@ -268,7 +268,7 @@ class Embeds(commands.Cog): # Set up the embed to display a random lemon gif embed = discord.Embed( title=f" | **{member.display_name}** Gives A Lemon To **{target.display_name}**", - colour=discord.Colour(int(random.choice(Config.colour_list)))) + colour=discord.Colour(int(random.choice(settings.colour_list)))) embed.set_image(url=random.choice(lemon_array)) embed.set_footer(text=f"Requested by {member}", icon_url='{}'.format(userAvatar)) embed.timestamp = datetime.datetime.utcnow() diff --git a/cogs/FunCommands.py b/cogs/FunCommands.py index b07cd12e..0901c454 100644 --- a/cogs/FunCommands.py +++ b/cogs/FunCommands.py @@ -5,11 +5,11 @@ import discord from discord.ext import commands from discord.ext.commands import BucketType, cooldown -import Config +import settings from cogs.Embeds import error_function -# Grabbing the list of colours defined in the Config.py file -colour_list = [c for c in Config.colors.values()] +# Grabbing the list of colours defined in the settings.py file +colour_list = [c for c in settings.colors.values()] # Set up the cog @@ -181,6 +181,15 @@ class Fun(commands.Cog): # Send out one of the responses stored in the array await ctx.send(f"{ctx.author.mention} {random.choice(responses)}") + # ~dm only allows me to dm anyone through the bot + @commands.command() + @commands.has_any_role('Hamothy', 'Servant') + async def dm(self, ctx, member: discord.Member, *, text): + # Send the message typed the mentioned user + await member.send(text) + + await ctx.message.delete() + def setup(bot): bot.add_cog(Fun(bot)) diff --git a/cogs/WaifuImages.py b/cogs/WaifuImages.py index bb57f91a..69b9ee4f 100644 --- a/cogs/WaifuImages.py +++ b/cogs/WaifuImages.py @@ -7,7 +7,7 @@ import discord from discord.ext import commands from discord.ext.commands import cooldown, BucketType -import Config +import settings from cogs.Embeds import error_function @@ -26,14 +26,14 @@ class Waifus(commands.Cog): kakashi_array = file.readlines() # If the channel that the command has been sent is in the list of accepted channels - if str(ctx.channel) in Config.channels: + if str(ctx.channel) in settings.channels: # Set member as the author member = ctx.message.author userAvatar = member.avatar_url embed = discord.Embed(title="**Hatake Kakashi**", - colour=discord.Colour(random.choice(Config.colour_list))) + colour=discord.Colour(random.choice(settings.colour_list))) embed.set_image(url=random.choice(kakashi_array)) embed.set_footer(text=f"Requested by {member}", icon_url='{}'.format(userAvatar)) embed.timestamp = datetime.datetime.utcnow() @@ -61,14 +61,14 @@ class Waifus(commands.Cog): toga_array = file.readlines() # If the channel that the command has been sent is in the list of accepted channels - if str(ctx.channel) in Config.channels: + if str(ctx.channel) in settings.channels: # Set member as the author member = ctx.message.author userAvatar = member.avatar_url embed = discord.Embed(title="**Himiko Toga**", - colour=discord.Colour(int(random.choice(Config.colour_list)))) + colour=discord.Colour(int(random.choice(settings.colour_list)))) embed.set_image(url=random.choice(toga_array)) embed.set_footer(text=f"Requested by {member}", icon_url='{}'.format(userAvatar)) embed.timestamp = datetime.datetime.utcnow() @@ -95,13 +95,14 @@ class Waifus(commands.Cog): tamaki_array = file.readlines() # If the channel that the command has been sent is in the list of accepted channels - if str(ctx.channel) in Config.channels: + if str(ctx.channel) in settings.channels: # set member as the author member = ctx.message.author userAvatar = member.avatar_url - embed = discord.Embed(title="**Tamaki Suoh**", colour=discord.Colour(random.choice(Config.colour_list))) + embed = discord.Embed(title="**Tamaki Suoh**", + colour=discord.Colour(random.choice(settings.colour_list))) embed.set_image(url=random.choice(tamaki_array)) embed.set_footer(text=f"Requested by {member}", icon_url='{}'.format(userAvatar)) embed.timestamp = datetime.datetime.utcnow() @@ -152,14 +153,14 @@ class Waifus(commands.Cog): array = file.readlines() # If the channel that the command has been sent is in the list of accepted channels - if str(ctx.channel) in Config.channels: + if str(ctx.channel) in settings.channels: # Set member as the author member = ctx.message.author userAvatar = member.avatar_url embed = discord.Embed( title=f"Oh Look! A Cute Person ", - colour=discord.Colour(random.choice(Config.colour_list))) + colour=discord.Colour(random.choice(settings.colour_list))) embed.set_image(url=random.choice(array)) embed.set_footer(text=f"Requested by {member}", icon_url='{}'.format(userAvatar)) embed.timestamp = datetime.datetime.utcnow() @@ -168,14 +169,14 @@ class Waifus(commands.Cog): def displayServerImage(array, ctx, name): # If the channel that the command has been sent is in the list of accepted channels - if str(ctx.channel) in Config.channels: + if str(ctx.channel) in settings.channels: # Set member as the author member = ctx.message.author userAvatar = member.avatar_url embed = discord.Embed( title=f"**Oh Look! A Cute Picture of {name.capitalize()}!! **", - colour=discord.Colour(random.choice(Config.colour_list))) + colour=discord.Colour(random.choice(settings.colour_list))) embed.set_image(url=random.choice(array)) embed.set_footer(text=f"Requested by {member}", icon_url='{}'.format(userAvatar)) embed.timestamp = datetime.datetime.utcnow()