diff options
author | Vidhu Kant Sharma <bokuwakanojogahoshii@yahoo.com> | 2020-12-16 15:00:26 +0530 |
---|---|---|
committer | Vidhu Kant Sharma <bokuwakanojogahoshii@yahoo.com> | 2020-12-16 15:00:26 +0530 |
commit | 0bb92bfe7a0350759c6213f0751bb3f9ac64920b (patch) | |
tree | 194047c24a5aec7f18ea95134ecb6647de42fb71 /bot.py | |
parent | d2a22a6f26c39350adc71158e43e5c7c902a28f3 (diff) |
added a command to find title of a sauce
Diffstat (limited to 'bot.py')
-rw-r--r-- | bot.py | 16 |
1 files changed, 15 insertions, 1 deletions
@@ -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) |