-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbot.py
37 lines (28 loc) · 1.02 KB
/
bot.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
# Knife-chan discord bot, bot for personal moderation of
# a discord server during the bot wars.
# Author: Lucas Lin
import os
import discord
from discord.ext import commands
import bot_commands
import commission_commands
from dotenv import load_dotenv
load_dotenv()
bot = commands.Bot(command_prefix='!')
@bot.event
async def on_message(message): # Not self
if message.author.bot and message.author.id != bot.user.id:
# add to dictionary
bot_commands.purge_target[message.channel.id] = {"discriminator": message.author.discriminator, "name": message.author.name}
# Commission Commands
await commission_commands._process_PURRRGE(message)
await bot.process_commands(message)
@bot.event
async def on_ready():
print("We have logged in as {0.user}".format(bot))
bot.add_command(bot_commands._testing)
bot.add_command(bot_commands._troll)
bot.add_command(bot_commands._purge)
bot.add_command(bot_commands._ping_pong)
bot.add_command(bot_commands._rotate)
bot.run(os.getenv("BOT_TOKEN"))