示例#1
0
文件: misc.py 项目: Zomatree/Ayumi
    def __init__(self, bot: core.Bot):
        self.bot = bot
        self.cleverbot = cb = ac.Cleverbot(
            api_key=bot.config['travitia']['token'],
            session=bot.session,
            context=ac.DictContext())

        cb.emotions = tuple(ac.Emotion)
示例#2
0
 async def on_message(self, message):
     if message.author.bot:
         return
     else:
         if message.content == "dude":
             await message.channel.send(f"Hmm?")
         elif message.content == "dude help":
             await message.channel.send(
                 f"Hmm, I don't have any commands but you can talk with me using dude <message> and i will reply to you & to get info about me use `dude say about you`!"
             )
         elif message.content == "dude say about you":
             await message.channel.send(
                 "Hey there, im DudeAI made by mikeuwu#8307, actually im a chatbot you can spend your time with me if you are bored or feeling lonely, you can keep your server active with help of me. If you have any questions/queries or need to give suggestion or need to report a bug please dm mikeuwu#8307"
             )
         else:
             if message.content.startswith("dude "):
                 #if message.author.voice is None:
                 dude = ai.Cleverbot("e/!-F6*FBW'8vZJ8,=No",
                                     context=ai.DictContext())
                 text = await dude.ask(message.content)
                 await message.channel.send(text.text)
                 await dude.close()
             else:
                 return
示例#3
0
 def __init__(self, client):
     self.client = client
     self.cleverbot = ac.Cleverbot(self.client.data["cbkey"])
     self.gapikey = self.client.data["gapikey"]
     self.cleverbot.set_context(ac.DictContext(self.cleverbot))
示例#4
0
 def __init__(self, bot):
     self.bot = bot
     self.pypi_logo = "https://static1.squarespace.com/static/59481d6bb8a79b8f7c70ec19/594a49e202d7bcca9e61fe23/59b2ee34914e6b6d89b9241c/1506011023937/pypi_logo.png?format=1000w"
     self.clever = async_cleverbot.Cleverbot(bot.config.cleverbot)
     self.clever.set_context(async_cleverbot.DictContext(self.bot))
     self.http = CyberHTTP()
示例#5
0
 def __init__(self, bot):
     self.bot = bot
     self.cleverbot = ac.Cleverbot("Your TravitiaAPI Key")
     self.cleverbot.set_context(ac.DictContext(self.cleverbot))
示例#6
0
 def __init__(self, bot):
     self.bot = bot
     self.x_r = ":warning:727013811571261540"
     self.clever = async_cleverbot.Cleverbot(self.bot.config.cleverbot)
     self.clever.set_context(async_cleverbot.DictContext(self.clever))
示例#7
0
 def __init__(self, api_key: str, session: ClientSession = None):
     self.session = session or None
     self.api_key = api_key  # API key for the Cleverbot API
     self.api_url = "https://public-api.travitia.xyz/talk"  # URL for requests
     self.emotions = tuple(ac.Emotion)
     self.set_context(ac.DictContext())
示例#8
0
 def __init__(self, client):
     self.client = client
     self.pypi = "https://raw.githubusercontent.com/github/explore/666de02829613e0244e9441b114edb85781e972c/topics/pip/pip.png"
     self.bot = async_cleverbot.Cleverbot(secrets()['cleverbot'])
     self.bot.set_context(async_cleverbot.DictContext(self.bot))
示例#9
0
文件: fun.py 项目: Crambin/Orderbot
 def __init__(self, bot):
     self.bot = bot
     api_key = os.getenv('CHATBOT_API_KEY')
     self.chat_bot = ac.Cleverbot(
         api_key, context=ac.DictContext()) if api_key else None
     self.is_talking = {}
示例#10
0
 def __init__(self, client):
     self.client = client
     self.x_r = ":warning:727013811571261540"
     self.bot = async_cleverbot.Cleverbot(secrets()['cleverbot'])
     self.bot.set_context(async_cleverbot.DictContext(self.bot))
示例#11
0
文件: cleverbot.py 项目: SienkoV2/Mio
 def __init__(self, bot):
     self.bot = bot
     self.cb_client = ac.Cleverbot(TRAVITIA_TOKEN)
     self.cb_client.set_context(ac.DictContext(self.cb_client))
     self.cb_emotions = tuple(ac.Emotion)
     self._cd = CooldownMapping.from_cooldown(1.0, 5.0, BucketType.member)
示例#12
0
 def __init__(self, bot):
     self.bot = bot
     self.cleverbot = ac.Cleverbot("lP/8s31p<L5S;+OrjL@W8s31p<L5S;+OrjL@Wy")
     self.cleverbot.set_context(ac.DictContext(self.cleverbot))
示例#13
0
 async def _make_cleverbot_session(self):
     cleverbot_session = ac.Cleverbot(await self._get_api_key(),
                                      context=ac.DictContext())
     return cleverbot_session