40 lines
866 B
Python
40 lines
866 B
Python
import os
|
|
|
|
import nextcord as discord
|
|
from dotenv import load_dotenv
|
|
from nextcord import RawReactionActionEvent
|
|
|
|
from kwaylon import Kwaylon
|
|
|
|
if __name__ == '__main__':
|
|
import logging
|
|
|
|
logging.basicConfig(level=logging.INFO)
|
|
|
|
client = Kwaylon()
|
|
|
|
|
|
@client.event
|
|
async def on_ready():
|
|
await client.handle_ready()
|
|
# await client.data.scan_messages(client=client, limit=50)
|
|
|
|
|
|
@client.event
|
|
async def on_message(message: discord.Message):
|
|
await client.handle_message(message)
|
|
|
|
|
|
@client.event
|
|
async def on_raw_reaction_add(payload: RawReactionActionEvent):
|
|
await client.handle_raw_reaction(payload)
|
|
|
|
|
|
@client.event
|
|
async def on_raw_reaction_remove(payload: RawReactionActionEvent):
|
|
await client.handle_raw_reaction(payload)
|
|
|
|
|
|
load_dotenv()
|
|
client.run(os.getenv('DISCORD_TOKEN'))
|