Added the ~enso command for the server members

pull/2/head
sgoudham 5 years ago
parent 850baabc00
commit dbe3a8d8cf

@ -115,10 +115,72 @@ class Waifus(commands.Cog):
# Bot ~ensoPerson command for the server members # Bot ~ensoPerson command for the server members
@commands.command(aliases=['enso', 'Ensoperson']) @commands.command(aliases=['enso', 'Ensoperson'])
async def ensoperson(self, ctx): async def ensoperson(self, ctx, name=None):
if name:
try:
with open(f'images/ServerMembers/{name}.txt') as file:
images_array = file.readlines()
try: embed = displayServerImage(images_array, ctx, name)
with open('images/ServerImages/serverMembers.txt') as file: await ctx.send(embed=embed)
except Exception as e:
print(e)
message = await ctx.send("Sorry! That person doesn't exist!!")
# Let the user read the message for 2.5 seconds
await asyncio.sleep(2.5)
# Delete the message
await message.delete()
else:
array = ['hussein', 'inna', 'kaiju', 'kate', 'lukas', 'marshall', 'stitch', 'zara', 'josh']
with open(f'images/ServerMembers/{random.choice(array)}.txt') as file:
array = file.readlines()
if str(ctx.channel) in channels:
# set member as the author
member = ctx.message.author
userAvatar = member.avatar_url
embed = discord.Embed(
title=f"**Oh Look! A Cute Person <a:huh:676195228872474643> <a:huh:676195228872474643> **",
colour=discord.Colour(random.choice(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()
await ctx.send(embed=embed)
def displayServerImage(array, ctx, name):
if str(ctx.channel) in 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()}!! <a:huh:676195228872474643> <a:huh:676195228872474643> **",
colour=discord.Colour(random.choice(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()
return embed
# Error handling function to make sure that the commands only work in bot-commands
def error_function():
return "Sorry! I only work in #bot-commands!"
def setup(bot):
bot.add_cog(Waifus(bot))
"""
with open('images/ServerMembers/serverMembers.txt') as file:
marsh_array = file.readlines() marsh_array = file.readlines()
if str(ctx.channel) in channels: if str(ctx.channel) in channels:
@ -143,14 +205,4 @@ class Waifus(commands.Cog):
# Delete the message # Delete the message
await message.delete() await message.delete()
except FileNotFoundError as e: """
print(e)
# Error handling function to make sure that the commands only work in bot-commands
def error_function():
return "Sorry! I only work in #bot-commands!"
def setup(bot):
bot.add_cog(Waifus(bot))

@ -0,0 +1,12 @@
https://cdn.discordapp.com/attachments/713893224481161277/722589416559869962/image0.jpg
https://cdn.discordapp.com/attachments/713893224481161277/722589552220438579/image0.png
https://cdn.discordapp.com/attachments/713893224481161277/722589631215960104/image0.png
https://cdn.discordapp.com/attachments/713893224481161277/722593622972694528/image0.jpg
https://cdn.discordapp.com/attachments/713893224481161277/722594155284529235/image0.png
https://cdn.discordapp.com/attachments/713893224481161277/722614873833340998/image0.jpg
https://cdn.discordapp.com/attachments/713893224481161277/722614973876142100/image0.jpg
https://media.discordapp.net/attachments/713893224481161277/722615114536189952/image0.jpg?width=494&height=658
https://media.discordapp.net/attachments/713893224481161277/722615205942788156/image0.jpg?width=494&height=658
https://cdn.discordapp.com/attachments/713893224481161277/722628280234147880/image0.jpg
https://cdn.discordapp.com/attachments/713893224481161277/722628347066187836/image0.jpg
https://cdn.discordapp.com/attachments/713893224481161277/722628435062685748/image0.jpg

@ -0,0 +1,8 @@
https://media.discordapp.net/attachments/716823227409760337/722590110117396490/qM8yybTFdsU.jpg?width=987&height=658
https://media.discordapp.net/attachments/716823227409760337/722590110645747782/g7DfAyjrIR4.jpg?width=493&height=657
https://media.discordapp.net/attachments/716823227409760337/722590110960582686/nRhhvnifdsQ.jpg?width=460&height=658
https://media.discordapp.net/attachments/716823227409760337/722591565968572507/TbWugsIW_oU.jpg?width=493&height=658
https://media.discordapp.net/attachments/716823227409760337/722591566199521280/-MOPw2RQIqs.jpg?width=1170&height=658
https://cdn.discordapp.com/attachments/716823227409760337/722616461616611350/Tkef0cWAyfA.jpg
https://media.discordapp.net/attachments/716823227409760337/722616461859749908/rbHVGS39fw0.jpg?width=450&height=658
https://cdn.discordapp.com/attachments/716823227409760337/722617441447968808/IMG_20191006_015744_993.jpg

@ -0,0 +1,7 @@
https://cdn.discordapp.com/attachments/714213422333558804/722627363724197949/20191025_195511.jpg
https://cdn.discordapp.com/attachments/714213422333558804/722627464802598912/20200415_214745.jpg
https://cdn.discordapp.com/attachments/714213422333558804/722627526735822948/20200430_182256.jpg
https://cdn.discordapp.com/attachments/714213422333558804/722627606976921670/20200615_192131.jpg
https://cdn.discordapp.com/attachments/714213422333558804/722627674274791524/20200616_214157.jpg
https://cdn.discordapp.com/attachments/714213422333558804/722627674736033882/20200616_214052.jpg
https://cdn.discordapp.com/attachments/714213422333558804/722627675298201740/20200616_214133.jpg

@ -0,0 +1,9 @@
https://cdn.discordapp.com/attachments/718206068089421845/722594479894298734/20200529_193815.jpg
https://cdn.discordapp.com/attachments/718206068089421845/722594480334569572/IMG_20200528_181031_915.jpg
https://cdn.discordapp.com/attachments/718206068089421845/722594480645079040/IMG_20200602_120101_952.jpg
https://cdn.discordapp.com/attachments/718206068089421845/722594481508974602/20200604_190756.jpg
https://cdn.discordapp.com/attachments/718206068089421845/722594753576828999/IMG_20200505_200842_-_Edited.jpg
https://cdn.discordapp.com/attachments/718206068089421845/722594753794801714/20200525_084631.jpg
https://cdn.discordapp.com/attachments/718206068089421845/722594754747039804/IMG_20200525_102448_633.jpg
https://cdn.discordapp.com/attachments/718206068089421845/722594992039788595/IMG_20200306_161138_665.jpg
https://cdn.discordapp.com/attachments/718206068089421845/722594992245178488/Untitled96_-_Edited.jpg

@ -0,0 +1,3 @@
https://cdn.discordapp.com/attachments/713822779622948884/722604693502689321/image0.png
https://cdn.discordapp.com/attachments/713822779622948884/722604694123315291/image1.jpg
https://media.discordapp.net/attachments/680383436023791659/709989233158389811/Snapchat-1036342865.jpg?width=370&height=658

@ -0,0 +1,5 @@
https://cdn.discordapp.com/attachments/716054176014008361/722624459801886760/image0.jpg
https://cdn.discordapp.com/attachments/716054176014008361/722624460070584330/image1.jpg
https://cdn.discordapp.com/attachments/716054176014008361/722624460720701520/image2.jpg
https://cdn.discordapp.com/attachments/716054176014008361/722626395280375868/image0.jpg
https://cdn.discordapp.com/attachments/716054176014008361/722626395813183488/image1.jpg

@ -0,0 +1,6 @@
https://media.discordapp.net/attachments/713802573324222534/722577742931165264/Snapchat-1776046194.jpg?width=492&height=658
https://cdn.discordapp.com/attachments/713802573324222534/722577743245475941/Snapchat-1565805690.jpg
https://cdn.discordapp.com/attachments/713802573324222534/722577743555985418/20200518_130307.jpg
https://cdn.discordapp.com/attachments/713802573324222534/722577743828484116/20200422_175943.jpg
https://cdn.discordapp.com/attachments/713802573324222534/722577744076079154/Snapchat-445490543.jpg
https://cdn.discordapp.com/attachments/713802573324222534/722577744353034290/Snapchat-417158061.jpg

@ -0,0 +1,6 @@
https://media.discordapp.net/attachments/683124285304209482/722626395184037918/image0.png
https://media.discordapp.net/attachments/683124285304209482/722626489207488582/image0.png
https://media.discordapp.net/attachments/683124285304209482/722626567154434089/image0.png
https://media.discordapp.net/attachments/683124285304209482/722626289982242866/image0.png

@ -0,0 +1,15 @@
https://cdn.discordapp.com/attachments/714671068941647933/722627211999313940/image0.jpg
https://cdn.discordapp.com/attachments/714671068941647933/722627498524934215/Snapchat-1101373341.jpg
https://cdn.discordapp.com/attachments/714671068941647933/722627514098515978/Snapchat-1062441506.jpg
https://cdn.discordapp.com/attachments/714671068941647933/722627537536024586/20200602_172202.jpg
https://cdn.discordapp.com/attachments/714671068941647933/722627559506051112/Snapchat-1350311291.jpg
https://cdn.discordapp.com/attachments/714671068941647933/722627599234498600/Snapchat-1793328349.jpg
https://cdn.discordapp.com/attachments/714671068941647933/722627665303175228/Snapchat-865488398.jpg
https://cdn.discordapp.com/attachments/714671068941647933/722627728310009897/Snapchat-1199931719.jpg
https://cdn.discordapp.com/attachments/714671068941647933/722627869335093318/Snapchat-523711946.jpg
https://cdn.discordapp.com/attachments/714671068941647933/722628024209768518/Snapchat-1723453690.jpg
https://cdn.discordapp.com/attachments/714671068941647933/722628024692113408/Snapchat-1388487288.jpg
https://cdn.discordapp.com/attachments/714671068941647933/722628025266470922/JPEG_20200119_222645.jpg
https://cdn.discordapp.com/attachments/714671068941647933/722629495642783795/Snapchat-1004499435.jpg
https://cdn.discordapp.com/attachments/714671068941647933/722629495881990214/Snapchat-1687000440.jpg
https://cdn.discordapp.com/attachments/714671068941647933/722629496305352704/Snapchat-1507200564.jpg
Loading…
Cancel
Save