Async Python message listening

   1309   0   0
User Avatar
Member
31 posts
Joined: April 2015
Offline
Hi,

i'm using an api whitch uses async and awake calls (i'm not that familiar with threading) - the problem is that these calls are stopping/blocking my whole houdini interface from working

I'm connecting houdini with discord by

import discord

token = "xxxxxxxxxx"

client = discord.Client()

@client.event
async def on_message(message):
    print(message.content)
  
    if message.content.find("hello") != -1:
        await message.channel.send("hi back") 

client.run(token)

but this blocks my whole houdini application - the python script is running smoothly in the background (and works)

Hope you can help me! - really desperate at the moment that this is not working



if it i matters: discord api is using asyncio to work with threads
Edited by Neonzone - Feb. 28, 2020 04:05:24
  • Quick Links