Fixed the discord colours

Randomised the colours appearing on the embed
kissing command is now working
THIS IS A FULLY WORKING VERSION
testing
sgoudham 5 years ago
parent b7abb6b48e
commit 679cc87028

@ -7,10 +7,12 @@ from discord.ext.commands import BucketType, cooldown
channels = ["bot-commands"]
colours = ["0xff0000", "0x5825ff", "0xff80ed", "0xa0f684", "0x7700cc", "0x0b04d9", "0x3d04ae", "0x000033", "0x00FFFF",
"0x120A8F", "0x7FFF0", "0xcc3300",
"0x5E260", "0xcc0000", "0x0066cc", "0x7632cd", "0x76a7cd", "0xffa7cd", "0xff24cd", "0xff2443", "0xff7d43",
"0xb52243", "0xb522ce", "0xb5f43d"]
colours = [0xff0000, 0x5825ff, 0xff80ed, 0xa0f684, 0x7700cc, 0x0b04d9, 0x3d04ae, 0x000033,
0x00FFFF,
0x120A8F, 0x7FFF0, 0xcc3300,
0x5E260, 0xcc0000, 0x0066cc, 0x7632cd, 0x76a7cd, 0xffa7cd, 0xff24cd, 0xff2443,
0xff7d43,
0xb52243, 0xb522ce, 0xb5f43d]
class Fun(commands.Cog):
@ -93,10 +95,11 @@ class Fun(commands.Cog):
# Sending out a random compliment from the array "responses"
await ctx.send(random.choice(responses))
@commands.command(aliases=["Kiss"])
@commands.command(aliases=["Kiss", "kiss"])
@cooldown(1, 0.5, BucketType.channel)
async def kissing(self, ctx, target: discord.Member):
if str(ctx.channel) in channels:
with open('kissing.txt') as file:
@ -108,8 +111,9 @@ class Fun(commands.Cog):
member = ctx.message.author
userAvatar = member.avatar_url
embed = discord.Embed(title=f"**{ctx.message.author} Kisses {target.display_name}!!**",
colour=discord.Colour(random.choice(colours)))
embed = discord.Embed(
title=f"<:blushlook1:677310734123663363> <:blushlook2:679524467248201769> | **{member.display_name}** kissed **{target.display_name}**",
colour=discord.Colour(int(random.choice(colours))))
embed.set_image(url=random.choice(kissing_array))
embed.set_footer(text=f"Requested by {ctx.message.author}", icon_url='{}'.format(userAvatar))
@ -131,6 +135,8 @@ class Fun(commands.Cog):
@cooldown(1, 0.5, BucketType.channel)
async def _8ball(self, ctx, *, question):
channels = ["bot-commands"]
with open('eightball.txt') as file:
_8ball_array = file.readlines()

@ -7,10 +7,12 @@ from discord.ext.commands import BucketType, cooldown
channels = ["bot-commands"]
colours = ["0xff0000", "0x5825ff", "0xff80ed", "0xa0f684", "0x7700cc", "0x0b04d9", "0x3d04ae", "0x000033", "0x00FFFF",
"0x120A8F", "0x7FFF0", "0xcc3300",
"0x5E260", "0xcc0000", "0x0066cc", "0x7632cd", "0x76a7cd", "0xffa7cd", "0xff24cd", "0xff2443", "0xff7d43",
"0xb52243", "0xb522ce", "0xb5f43d"]
colours = [0xff0000, 0x5825ff, 0xff80ed, 0xa0f684, 0x7700cc, 0x0b04d9, 0x3d04ae, 0x000033,
0x00FFFF,
0x120A8F, 0x7FFF0, 0xcc3300,
0x5E260, 0xcc0000, 0x0066cc, 0x7632cd, 0x76a7cd, 0xffa7cd, 0xff24cd, 0xff2443,
0xff7d43,
0xb52243, 0xb522ce, 0xb5f43d]
class Waifus(commands.Cog):
@ -22,8 +24,9 @@ class Waifus(commands.Cog):
@cooldown(1, 0, BucketType.channel)
async def kakashi(self, ctx):
with open('kakashiImages.txt') as file:
kakashi_array = file.readlines()
try:
with open('kakashiImages.txt') as file:
kakashi_array = file.readlines()
if str(ctx.channel) in channels:
@ -44,6 +47,8 @@ class Waifus(commands.Cog):
await asyncio.sleep(2.5)
# Delete the message
await message.delete()
except Exception as e:
print(f'{e}')
# Bot ~Toga command for Josh
@commands.command(aliases=['Toga'])
@ -58,7 +63,7 @@ class Waifus(commands.Cog):
member = ctx.message.author # set member as the author
userAvatar = member.avatar_url
embed = discord.Embed(title="**Himiko Toga**", colour=discord.Colour(random.choice(colours)))
embed = discord.Embed(title="**Himiko Toga**", colour=discord.Colour(int(random.choice(colours))))
embed.set_image(url=random.choice(toga_array))
embed.set_footer(text=f"Requested by {ctx.message.author}", icon_url='{}'.format(userAvatar))
await ctx.send(embed=embed)

@ -1 +1 @@
https://tenor.com/view/anime-kiss-love-sweet-gif-5095865
https://media.discordapp.net/attachments/652999909989023784/718264206616559686/tenor.gif
Loading…
Cancel
Save