Skip to content

Instantly share code, notes, and snippets.

@jeffreymeng
Created February 22, 2024 03:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jeffreymeng/cbb4bc163af4e0342afd93ed7f5f6b91 to your computer and use it in GitHub Desktop.
Save jeffreymeng/cbb4bc163af4e0342afd93ed7f5f6b91 to your computer and use it in GitHub Desktop.
from collections import defaultdict
import os
import discord
from discord import Message
from dotenv import load_dotenv
intents = discord.Intents.default()
intents.message_content = True
client = discord.Client(intents=intents)
@client.event
async def on_ready():
print(f'connected as {client.user}')
load_dotenv()
client.run(os.getenv("BOT_TOKEN"))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment