999catbot/bot/catbot.py

24 lines
682 B
Python
Raw Normal View History

2024-02-23 01:53:21 +00:00
import discord
import os
from discord.ext import commands
from dotenv import load_dotenv
class CatBot():
def __init__(self):
load_dotenv("./vars/.env")
intents = discord.Intents.all()
client = discord.Client(intents=intents)
bot = commands.Bot(command_prefix='!', intents=intents)
# Set the confirmation message when the bot is ready
@bot.event
async def on_ready():
print(f'Logged in as {bot.user.name}')
@bot.event
async def on_message(message):
if "marco" in message.content:
await message.channel.send('polo')
bot.run(os.getenv('TOKEN'))