first switch to nextcord
This commit is contained in:
@@ -3,11 +3,13 @@ FROM python:latest
|
|||||||
RUN python -m pip install --upgrade pip
|
RUN python -m pip install --upgrade pip
|
||||||
|
|
||||||
RUN pip install pandas
|
RUN pip install pandas
|
||||||
RUN pip install discord.py
|
# RUN pip install discord.py
|
||||||
RUN pip install nltk
|
RUN pip install nltk
|
||||||
RUN python -m nltk.downloader -d /usr/local/share/nltk_data all
|
RUN python -m nltk.downloader -d /usr/local/share/nltk_data all
|
||||||
RUN pip install python-dotenv
|
RUN pip install python-dotenv
|
||||||
|
|
||||||
|
RUN pip install nextcord
|
||||||
|
|
||||||
WORKDIR /usr/src/app
|
WORKDIR /usr/src/app
|
||||||
COPY ./ ./
|
COPY ./ ./
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import re
|
import re
|
||||||
|
|
||||||
import discord
|
import nextcord as discord
|
||||||
|
|
||||||
|
|
||||||
class Joke:
|
class Joke:
|
||||||
|
|||||||
@@ -1,11 +1,13 @@
|
|||||||
import re
|
import re
|
||||||
|
|
||||||
import discord
|
import nextcord as discord
|
||||||
# import stockquotes
|
|
||||||
|
|
||||||
from . import base, helpers
|
from . import base, helpers
|
||||||
|
|
||||||
|
|
||||||
|
# import stockquotes
|
||||||
|
|
||||||
|
|
||||||
# TODO implement new jokes
|
# TODO implement new jokes
|
||||||
# - j'accuse
|
# - j'accuse
|
||||||
# - egos
|
# - egos
|
||||||
|
|||||||
@@ -2,11 +2,10 @@ import logging
|
|||||||
import re
|
import re
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
|
|
||||||
import discord
|
import nextcord as discord
|
||||||
import pandas as pd
|
import pandas as pd
|
||||||
from discord import RawReactionActionEvent
|
|
||||||
|
|
||||||
from . import data, jokes
|
from . import jokes
|
||||||
|
|
||||||
LIL_STINKY_ID = 704043422276780072
|
LIL_STINKY_ID = 704043422276780072
|
||||||
|
|
||||||
@@ -69,7 +68,7 @@ class Kwaylon(discord.Client):
|
|||||||
LOGGER.info(f'{joke.__class__.__name__} detected: {message.content}, {m.group()}')
|
LOGGER.info(f'{joke.__class__.__name__} detected: {message.content}, {m.group()}')
|
||||||
await joke.respond(message, self, m)
|
await joke.respond(message, self, m)
|
||||||
|
|
||||||
async def handle_raw_reaction(self, payload: RawReactionActionEvent):
|
async def handle_raw_reaction(self, payload: discord.RawReactionActionEvent):
|
||||||
LOGGER.info(payload)
|
LOGGER.info(payload)
|
||||||
guild = await self.fetch_guild(payload.guild_id)
|
guild = await self.fetch_guild(payload.guild_id)
|
||||||
channel = await guild.fetch_channel(payload.channel_id)
|
channel = await guild.fetch_channel(payload.channel_id)
|
||||||
|
|||||||
4
main.py
4
main.py
@@ -1,6 +1,6 @@
|
|||||||
import os
|
import os
|
||||||
|
|
||||||
from discord import Message, RawReactionActionEvent
|
import nextcord as discord
|
||||||
from dotenv import load_dotenv
|
from dotenv import load_dotenv
|
||||||
|
|
||||||
from kwaylon import Kwaylon
|
from kwaylon import Kwaylon
|
||||||
@@ -23,7 +23,7 @@ if __name__ == '__main__':
|
|||||||
|
|
||||||
|
|
||||||
@client.event
|
@client.event
|
||||||
async def on_message(message: Message):
|
async def on_message(message: discord.Message):
|
||||||
await client.handle_message(message)
|
await client.handle_message(message)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
pandas
|
pandas
|
||||||
discord.py
|
# discord.py
|
||||||
# nextcord
|
nextcord
|
||||||
nltk
|
nltk
|
||||||
python-dotenv
|
python-dotenv
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user