Skip to content

A discord bot that generates and sends messages based on Markov Chain Model.

License

Notifications You must be signed in to change notification settings

m-nobinur/d-markov-chatbot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

d-markov-chatbot 🪄

A discord bot that generates and sends messages based on Markov Chain Model.

Implementation

  • Implemented Markov Chain Model to generate text messages.
  • Utilized queue data-structure to create Markov Chain.
  • Utilized SQL async io operations using aiosqlite.

Pre-requisites

Setup

How to start

Open terminal and go to d-markov-chatbot folder.

cd d-markov-chatbot

Install all the requirements

pip install -r requirements.txt

or

pip3 install -r requirements.txt

Run your bot

Set BOT_TOKEN variable to <YOUR_BOT_TOKEN> & set a BOT_PREFIX then run the script as following (On Mac/Linux)

python3 chat-bot.py

(On Windows)

python chat-bot.py

ℹ️ Use virtual environment for best practices.

Available command

Variable What it is
>info Show bot & channels info.
>help Show available commands and their usages.
>chat <channel_mention> Add the mentioned channel to Chatting channel list.
>train <channel_mention> Add the mentioned channel to Training channel list.
>reset Reset the whole database.

Bot will start messaging in chat channel when user will send a message. Make sure there at least 30 messages sent in the traning channels.

About

A discord bot that generates and sends messages based on Markov Chain Model.

Topics

Resources

License

Stars

Watchers

Forks

Languages