-
Notifications
You must be signed in to change notification settings - Fork 0
/
pipebot.py
37 lines (25 loc) · 907 Bytes
/
pipebot.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
from __future__ import annotations
import disnake
import os
from disnake.ext import commands
from dotenv import load_dotenv
from cogs import AvatarRandomizer, GithubCmds, Webserver
load_dotenv()
intents = disnake.Intents.default()
intents.message_content = True
intents.members = True
bot = commands.InteractionBot(intents=intents)
bot.add_cog(AvatarRandomizer(bot)) # type: ignore[arg-type]
bot.add_cog(GithubCmds(bot)) # type: ignore[arg-type]
bot.add_cog(Webserver(bot)) # type: ignore[arg-type]
@bot.event
async def on_ready() -> None:
print(f"We have logged in as {bot.user}")
@bot.event
async def on_message(message: disnake.Message) -> None:
if message.author == bot.user:
return
if "blender" in message.content.lower():
await message.add_reaction("blender:1166462167571238922")
await message.add_reaction("👀")
bot.run(os.getenv("CLIENT_TOKEN"))