Slide 19
Slide 19 text
TWO EXAMPLES
We receive messages from Discord and we send them to our
clients
class ChatClient(discord.Client):
async def on_message(self, message):
data = {
"channel": str(message.channel.id),
"event_ts": str(message.created_at.timestamp()),
"text": message.content,
"ts": str(message.created_at.timestamp()),
"user": message.author.nick,
"event_id": str(message.id),
"event_time": int(message.created_at.timestamp()),
"team_id": str(message.guild.id),
}
await make_webhook_transaction(data)