A discord bot to analyse message and react with a smily.
This repo contains the code and detailed instruction to implement a discord bot to read messages and detect the sentiment, emotion and sarcasm of the message according to it’s 1.2B twitter trained data and reply with a suitable smily. I have deployed it in my office server to have some fun with it.
You can read the details in my blog post.
Before proceeding, make sure you have installed python3
(the repo is tested with python3.7)
- Clone the repo:
git clone https://github.com/anuragbhattacharjee/discord-nlp-smily-bot.git
- Make an environment:
python3 -m venv your-path-to-venv
- Activate the environemnt:
source venv/bin/activate
- Install requirements:
pip3 install -r requirements.txt
- Download the vocabulary and save it in tochMoji/model
- Download weights and save it in tochMoji/model
python3
>>> from emojize import Emojize
>>> e = Emojize()
>>> e.predict("I am doing great today!")
:smile:
- Connect to discord bot following my blog post.
- type a message in a channel and see the bot reacting