29 lines
700 B
Python
29 lines
700 B
Python
import discord
|
|
|
|
import lib.log as log
|
|
from lib.settings import *
|
|
from lib.events import *
|
|
|
|
intents = discord.Intents(messages=True, guilds=True, message_content=True, reactions=True)
|
|
client = discord.Client(intents=intents)
|
|
|
|
@client.event
|
|
async def on_message(msg):
|
|
await on_message_or_reaction(client, msg)
|
|
|
|
@client.event
|
|
async def on_raw_reaction_add(rxn):
|
|
await on_message_or_reaction(client, rxn)
|
|
|
|
@client.event
|
|
async def on_ready():
|
|
log.write("READY.", log.colors.fg.lightgreen)
|
|
|
|
def main():
|
|
log.write("Starting up...", log.colors.fg.yellow)
|
|
settings = get_settings(initialize=True)
|
|
client.run(settings["token"], log_handler=None)
|
|
|
|
if __name__ == "__main__":
|
|
main()
|