Exemplo n.º 1
0
    async def on_message(self, message):
        channel = message.channel
	usertoclone = 'fakeuser'
        print(message.channel.name)
        print(message.author.name)
        if message.content != "":
            if message.author == "El Boto":
                return
            if message.author.bot: return
            if message.channel.name == "el-botos-lab" or message.channel.name == "all-bots-lab" or message.channel.name == "el-bapos-crackshack" or message.author.name==usertoclone: 
                await channel.send(chatbot.get_response(message.content))
            else:
                if message.content.startswith('boto!sing'):
                    await message.channel.send('<:magik:516450274672640001>')
                    await message.channel.send('*Domo Arigato, Mr. El Boto* \n *Domo Arigato, Mr. El Boto* \n Youre wondering who I am \n *glory glory, to el boto* \n the savior or a cuck \n *glory glory, to el boto* \n with code from EL Bapo  \n *glory glory, to el boto* \n I am the modern Bapo')
                    await message.channel.send('<:magik:516450274672640001>')  
                if message.content.startswith('boto!hello'):
                    await message.channel.send('nyet')
                if message.content.startswith('Go away) or message.content.startswith('go away'):
                    await message.channel.send('rude')
                    await channel.connect()
                if message.content.startswith('bruh'):
                    await message.channel.send('...just why')
                if message.content.startswith('why'):
                    await message.channel.send('you know why')
                if message.content.startswith('let me introduce you to the new member of this server!'):
                    await message.channel.send('kek')
                if ' alexa 'in message.content or 'alexa' in message.content:
                    await message.channel.send("*dead meme")
                if message.content.startswith('<:angery:506624600466259968>'):
                    await message.channel.send('<:magik:516450274672640001>')
Exemplo n.º 2
0
def get_bot_response(message):
    bot_response = chatbot.get_response(message)
    if bot_response:
        data = {'Response': f'{bot_response}'}
        json_response = json.dumps(data, ensure_ascii=False)
        response = Response(json_response,
                            content_type="application/json;charset=utf-8")
        return response, 200
    else:
        return 'O contéudo não foi encontrado.', 204
Exemplo n.º 3
0
from bot import chatbot
from my_functions import *

while True:
    user = input("Voce: ")
    response = chatbot.get_response(user)

    if is_function(response):
        response = call_function(response)

    print("Bot: " + str(response))
    print("Confidence: " + str(response.confidence))