Skip to content

Instantly share code, notes, and snippets.

View siddAhmed's full-sized avatar
:electron:

Ahmed Siddiqui siddAhmed

:electron:
View GitHub Profile
@siddAhmed
siddAhmed / fastapi-discord.py
Created June 6, 2021 07:46 — forked from haykkh/fastapi-discord.py
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