From 3cda3a4dafdab4c1adaed10a8afc970e7818eeb5 Mon Sep 17 00:00:00 2001 From: sgoudham Date: Wed, 3 Jun 2020 20:05:30 +0100 Subject: [PATCH] Fixed 8ball commands --- .gitignore | 2 +- .idea/dictionaries/sgoud.xml | 1 + 8ballcommands.txt | 52 -------------------- EnsoBot.py | 4 +- bottoken/token.txt | 1 - cogs/FunCommands.py | 23 +++++---- cogs/WaifuImages.py | 22 ++++----- cogs/__pycache__/FunCommands.cpython-36.pyc | Bin 3965 -> 3961 bytes cogs/__pycache__/WaifuImages.cpython-36.pyc | Bin 1528 -> 1514 bytes eightball.txt | 52 ++++++++++++++++++++ token.txt | 1 - 11 files changed, 81 insertions(+), 77 deletions(-) delete mode 100644 8ballcommands.txt delete mode 100644 bottoken/token.txt create mode 100644 eightball.txt delete mode 100644 token.txt diff --git a/.gitignore b/.gitignore index 074bf70d..9c6b501e 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,2 @@ #Hiding Token -*bottoken \ No newline at end of file +*token.txt \ No newline at end of file diff --git a/.idea/dictionaries/sgoud.xml b/.idea/dictionaries/sgoud.xml index 741b99d7..6526687b 100644 --- a/.idea/dictionaries/sgoud.xml +++ b/.idea/dictionaries/sgoud.xml @@ -2,6 +2,7 @@ cooldown + eightball hamothy kakashi oken diff --git a/8ballcommands.txt b/8ballcommands.txt deleted file mode 100644 index ed032912..00000000 --- a/8ballcommands.txt +++ /dev/null @@ -1,52 +0,0 @@ -Hamothy is preoccupied with catching a case -The prophet Kate believes it will come true -Josh doesn't believe in the outcome :( -Izzy can't predict this -Idk idiot lmao -Why are you even asking me -It's not like I can read your question -Zara wants to protest your question -Stitch will definitely get back to you -*Kakashi slams you to the wall* -Kate is too busy reading yaoi to answer your question -It- It's not lik- It's not like I want to answer your question or anything *tsundere noises* -Connor is too busy making tea and simping for beautiful women to reply to this -Maybe -Who said you could ask that question? -Ifrah cannot answer that -Hussein be spitting too much fire to look at your weak ass question -Literally no one gives a shit -N O spells NO -Find something better to do with your spare time smh -Sure but did you know that Izzy smells? -No but did you know that Stitch smells? -Get back to horny jail RIGHT NOW -Nick Cock Bro -Nice Tits -No -Yes -Pffft you wish -Never in a million years -You're wasting your time asking me -Taz is too busy simping over Anonymous to care -Leave me alone. I'm sad :( -Shoot your Shot King -Of course! -If you believe hard enough it'll come true!! -Inna likes this question but you'll have to answer it yourself ╮(︶▽︶)╭ -Dm Taz to truly find out the answer to this one -Hussein approves of these FIRE bars -Why you gotta ask me a question when I'm just vibin bro :pensive: -Hamothy LOVES this question and nods approvingly -I don't have the energy to answer this question... -The Swedish fish agrees -You're better off asking Dyno Ensō is in a bad mood right now :( -The answer lies within your heart -All the signs point to yes! -Marshall would love to agree with you -That's so litty titty bro -I'm Izzy and I approve of this message -Inna would love to agree with you -Hamothy has used his godlike like powers to align the stars for you it must be true -Gabriel appears out of thin air and smites you -Yes yes yes!!! \ No newline at end of file diff --git a/EnsoBot.py b/EnsoBot.py index 0fbc8843..0ac24b94 100644 --- a/EnsoBot.py +++ b/EnsoBot.py @@ -3,8 +3,10 @@ import discord from discord.ext import commands # Bot Prefix +from discord.ext.commands import bot + client = commands.Bot(command_prefix='~') -token = open("bottoken/token.txt", "r").readline() +token = open("DiscordToken/token.txt", "rt").readline() # Instantiates a list for all the cogs extensions = ['cogs.WaifuImages', 'cogs.FunCommands'] diff --git a/bottoken/token.txt b/bottoken/token.txt deleted file mode 100644 index cdcece77..00000000 --- a/bottoken/token.txt +++ /dev/null @@ -1 +0,0 @@ -NzE2NzAxNjk5MTQ1NzI4MDk0.XtfsuQ._IdMRicG7AGsne1g1Bkjhtmcm0I \ No newline at end of file diff --git a/cogs/FunCommands.py b/cogs/FunCommands.py index 9ffa0e76..c9715510 100644 --- a/cogs/FunCommands.py +++ b/cogs/FunCommands.py @@ -75,19 +75,22 @@ class Fun(commands.Cog): channels = ["bot-commands"] - with open('8ballcommands.txt') as file: + with open('eightball.txt') as file: _8ball_array = file.readlines() - if str(ctx.channel) in channels: - await ctx.send(f'Question: {question}\nAnswer: {random.choice(_8ball_array)}') - else: - message = await ctx.send(error_function()) - # Let the user read the message for 2.5 seconds - await asyncio.sleep(2.5) - # Delete the message - await message.delete() + if str(ctx.channel) in channels: - file.close() + await ctx.send(f'Question: {question}\nAnswer: {random.choice(_8ball_array)}') + + else: + message = await ctx.send(error_function()) + + # Let the user read the message for 2.5 seconds + await asyncio.sleep(2.5) + # Delete the message + await message.delete() + + file.close() def error_function(): diff --git a/cogs/WaifuImages.py b/cogs/WaifuImages.py index 59a3e107..e685af8b 100644 --- a/cogs/WaifuImages.py +++ b/cogs/WaifuImages.py @@ -19,20 +19,20 @@ class Waifus(commands.Cog): with open('kakashiImages.txt') as file: kakashi_array = file.readlines() - if str(ctx.channel) in channels: + if str(ctx.channel) in channels: - embed = discord.Embed(title="```Random Kakashi Image```", colour=discord.Colour(0xff0000), ) - embed.set_image(url=random.choice(kakashi_array)) - await ctx.send(embed=embed) - else: - message = await ctx.send(error_function()) + embed = discord.Embed(title="```Random Kakashi Image```", colour=discord.Colour(0xff0000), ) + embed.set_image(url=random.choice(kakashi_array)) + await ctx.send(embed=embed) + else: + message = await ctx.send(error_function()) - # Let the user read the message for 2.5 seconds - await asyncio.sleep(2.5) - # Delete the message - await message.delete() + # Let the user read the message for 2.5 seconds + await asyncio.sleep(2.5) + # Delete the message + await message.delete() - file.close() + file.close() def error_function(): diff --git a/cogs/__pycache__/FunCommands.cpython-36.pyc b/cogs/__pycache__/FunCommands.cpython-36.pyc index 8f98d52c11e4f34240c4a528c8da5655a8599bad..786e52e2256ec719a9b5bbfa6f2040118f86584e 100644 GIT binary patch delta 113 zcmV-%0FM9t9{C;#GYt(25c1bvw6O`c3mJHQ1bhT)0fPX21#|*@0crz-0ek~%269T1 z;tN~}R{&%HQ2r7YYq!X=iA3Vqt7-lVS|!2nYfW0we@3olXebk T0c4Zn4l)7SlNAqT16T+Ifpj0T delta 117 zcmV-*0E++l9{nB(GYt(2R?OF4j@3l XlX4Dg0b!Hg4l)5+lMxSP162qF(%B#` diff --git a/cogs/__pycache__/WaifuImages.cpython-36.pyc b/cogs/__pycache__/WaifuImages.cpython-36.pyc index 844b404ae3d8750d38f14dd2e03e12d09497fc4a..8976c599391ffb669d01aee99ae516919900986d 100644 GIT binary patch delta 400 zcmYk0yGjE=6o%)_WiPoILyQCxI|GRj1XEdAYN>d`LJgTEX4Q?%P9d_3#WXhY!n}i} zXf1-Bj}X{Lu(Grfos|d<%zx(m|M`aVnSIZ?OZj|e?_<3G^5l-;@*W|?p${>Zh+_pe z*D;BR4+_Op;s|`AAi~F%IF!_9oEWt@RlwN@$1GyLEgj#DQpXwrAVXv##_bWTA&yoN zpkOieWL61c&DTD5qbRBJ=U44fu`Vnun`et2o=t{Gg z(BYXEB(Ctf{A3V#VM0PF61#WQ4Fc~(Z<3C#khZ=eb^So9ZepK$Vc6|^`i<19mEUhH zoB;nrR#6hB&1_)btlU=(PSh3+CO-iK;20 gp301oB+Cb3Zzy=%JC`D56Mf5CP}9$Bnanx#2LwZ0!TEIf$f4^kM`%o?*vHZnVf$}WP# zmEnp38~f|7xWHBShXnRdxaP34yoo=+f%(k)`F(Hx7M=?3W~r3__Ir9d`Q=XWb^-t# zyO>e7@J6{K;bTMXh2FO3oTCGe1wFCwt|-|f^;}l_`RI6goQZ;sda4n zny?Qi@J`tlKcpMxIWsJ9OEr<(W0Km59TsINEGL#i?u^mMn*|b^=fw3(v^vKXl>qr{@7SDPx6tq)hTy zF|1+*EBcWh88+DcT-8*qm>ZK>If|tVO8)OCEi#sF1zXVrO T%z9h;&RWH){%LK|r5yVYjDlyC diff --git a/eightball.txt b/eightball.txt new file mode 100644 index 00000000..da2d13ab --- /dev/null +++ b/eightball.txt @@ -0,0 +1,52 @@ +"Hamothy is preoccupied with catching a case" +“The prophet Kate believes it will come true” +“Josh doesn't believe in the outcome :(“ +“Izzy can't predict this" +“Idk idiot lmao“ +“Why are you even asking me“ +“It's not like I can read your question“ +“Zara wants to protest your question“ +“Stitch will definitely get back to you“ +“*Kakashi slams you to the wall*“ +“Kate is too busy reading yaoi to answer your question“ +“It- It's not lik- It's not like I want to answer your question or anything *tsundere noises*“ +“Connor is too busy making tea and simping for beautiful women to reply to this“ +“Maybe“ +“Who said you could ask that question?“ +“Ifrah cannot answer that“ +“Hussein be spitting too much fire to look at your weak ass question“ +“Literally no one gives a shit“ +“N O spells NO“ +“Find something better to do with your spare time smh“ +“Sure but did you know that Izzy smells?“ +“No but did you know that Stitch smells?“ +“Get back to horny jail RIGHT NOW“ +“Nick Cock Bro“ +“Nice Tits“ +“No“ +“Yes" +“Pffft you wish“ +“Never in a million years“ +“You're wasting your time asking me“ +“Taz is too busy doing ahegao faces on tiktok to care“ +“Leave me alone. I'm sad :(“ +“Shoot your Shot King“ +“Of course!“ +“If you believe hard enough it'll come true!!“ +“Inna likes this question but you'll have to answer it yourself ╮(︶▽︶)╭“ +“Dm Taz to truly find out the answer to this one“ +“Hussein approves of these FIRE bars“ +“Why you gotta ask me a question when I'm just vibin bro :pensive: “ +“Hamothy LOVES this question and nods approvingly“ +“I don't have the energy to answer this question...“ +“The Swedish fish agrees“ +“You're better off asking Dyno Ensō is in a bad mood right now :(“ +“The answer lies within your heart“ +“All the signs point to yes!“ +“Marshall would love to agree with you“ +“That's so litty titty bro“ +“I'm Izzy and I approve of this message“ +“Inna would love to agree with you“ +“Hamothy has used his godlike like powers to align the stars for you it must be true“ +“Gabriel appears out of thin air and smites you“ +“Yes yes yes!!!“ diff --git a/token.txt b/token.txt deleted file mode 100644 index 75bb50aa..00000000 --- a/token.txt +++ /dev/null @@ -1 +0,0 @@ -NzE2NzAxNjk5MTQ1NzI4MDk0.Xtft4Q.h7ugoWpDcHsH81E-qquI-JvRsg0 \ No newline at end of file