aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVidhu Kant Sharma <bokuwakanojogahoshii@yahoo.com>2020-12-16 15:00:26 +0530
committerVidhu Kant Sharma <bokuwakanojogahoshii@yahoo.com>2020-12-16 15:00:26 +0530
commit0bb92bfe7a0350759c6213f0751bb3f9ac64920b (patch)
tree194047c24a5aec7f18ea95134ecb6647de42fb71
parentd2a22a6f26c39350adc71158e43e5c7c902a28f3 (diff)
added a command to find title of a sauce
-rw-r--r--bot.py16
1 files changed, 15 insertions, 1 deletions
diff --git a/bot.py b/bot.py
index 1f474b5..e54c787 100644
--- a/bot.py
+++ b/bot.py
@@ -2,7 +2,8 @@ import discord
import os
from dotenv import load_dotenv
import random
-# from hentai import hentai
+import math
+import henti as H # the good stuff
greetings = ["Greetings.", "Hello.", "Hey!", "Yahallo!", "Namaskar,", "Konnichiwa,", "Yo!"]
def get_info():
@@ -33,6 +34,7 @@ HELP_MESSAGE = '```Every command should be prefixed with "' + CALL + '".\n\nsay
load_dotenv()
TOKEN = os.getenv('DISCORD_TOKEN')
+PASSWORD = os.getenv('ADMIN_PASSWORD') # this can prove to be insecure af
# frontend stuff
client = discord.Client()
@@ -47,6 +49,7 @@ async def on_ready():
@client.event
async def on_message(message):
+ # ignore if sent by itself
if message.author == client.user:
return
@@ -72,4 +75,15 @@ async def on_message(message):
await message.channel.send(response)
+# cultured stuff
+@client.event
+async def on_message(message):
+ if message.author == client.user:
+ return
+
+ if message.content.split()[0] == CALL + 'find': # find title of henti
+ sauce = (''.join(message.content.split()[1:]))
+ response = H.find_title(sauce)
+ await message.channel.send(response)
+
client.run(TOKEN)