Skip to content

Instantly share code, notes, and snippets.

View haykkh's full-sized avatar
🍒
Gardening

Hayk Khachatryan haykkh

🍒
Gardening
View GitHub Profile
@haykkh
haykkh / fastapi-discord.py
Created June 24, 2020 10:09
How to run a discord.py bot with FastAPI
import asyncio
import discord
from fastapi import FastAPI
app = FastAPI()
client = discord.Client()
# where the magic happens
# register an asyncio.create_task(client.start()) on app's startup event

Keybase proof

I hereby claim:

  • I am haykkh on github.
  • I am haykkh (https://keybase.io/haykkh) on keybase.
  • I have a public key ASCdg-Z0KWEMSBfMCilfsNA8qg-8tMjorAEMaP2h1X-i1Qo

To claim this, I am signing this object: