Implementation of Chatterbot using Discord API

Overview

discord-chat-bot

Implementation of Chatterbot using Discord API.

Usage

Due to the necessity of storing files to train the AI, the bot is not hosted publicy. You must download this repository and run the chat-bot.py script using your own bot account.

1. Create your own discord bot

Set up your bot and copy the token in Discord's developer portal at Application > (your application) > Bot > Token. Paste it into token.txt.

2. Install dependencies

chat-bot.py requires the modules that are imported at the top of the script, namely chatterbot and discord.py. To install these, open a command prompt and type pip install chatterbot and pip install discord.py and wait for each to install. If running the chat-bot.py script gives an error that either of the modules are not found, you should attempt to use pip3 instead to ensure the modules are installed to the correct python version. If chatterbot fails to install, type pip install chatterbot=1.0.0 instead.

3. Set up convos directory

Chatbot saves conversations cached by discord users to numbered .txt files. Each file represents one conversation in which each line is a valid response to the one before it. You can create your own files manually (following the number file name scheme) or teach the bot with commands within Discord (see below). You can change the directory in which conversations are saved by changing the CONVO_DIR variable within the chat-bot.py script.

4. Run the chat-bot.py script

Using any python interpreter, run the chat-bot.py script. When this script is running, your bot should be online and available for use!

Commands

  • $talk args: any

Takes any string of lowercase letters as input for the AI to repsond to. Any bot commands, numbers, and symbols are stripped before being interpreted.

  • $teach (in reply to another message or reply chain)

Takes every message in a reply chain and caches it as a conversation. If cache is full, all conversations will be saved.

  • $train args: 'basic', 'custom', 'clear'

Retrains AI. All of the cache is saved before training. basic will train based on the default English corpus, custom will train based on saved conversations, and clear will reset the AI storage (not saved custom conversations) before retraining. clear is accessible only to administrators of the server. Note that while one parameter is required, more than one can be passed in at once.

  • $cache_handle args: 'clear', 'write'

Modifies cache. clear will reset the cache and delete recently taught conversations. write will save all conversations in the cache. Accessible only to administrators of the server.

  • $check

Sends status.

Owner
kiwijuice56
kiwijuice56
BT CCXT Store

bt-ccxt-store-cn backtrader是一个非常好的开源量化回测平台,我自己也时常用它,backtrader也能接入实盘,而bt-ccxt-store就是帮助backtrader接入数字货币实盘交易的一个插件,但是bt-ccxt-store的某些实现并不是很好,无节制的网络轮询,一些

moses 40 Dec 31, 2022
A Bot to Track Kernel Upstreams from kernel.org and Post it on Telegram Channel

Channel Kernel Tracker is the channel where the bot will be sending the updates in. Introduction This is a Telegram Bot to Track Kernel Upstreams kern

Kartikeya Hegde 3 Oct 05, 2021
Tools convert cookies facebook menjadi token facebook.

Tools convert cookies facebook menjadi token facebook.

Muhammad Latif Harkat 2 Jul 17, 2022
itadori webhook spammer fucker

itadori-webhook-spammer-fucker Installation # install the requirements $ python3 -m pip install -r requirements.txt $ python3 main.py Repl.it: https:/

6 Mar 05, 2022
Yet another Wahrheit-oder-Pflicht bot for Telegram, because all the others suck.

Der WoPperBot Yet another Wahrheit-oder-Pflicht bot for Telegram, because all the others suck. The existing bots are all defunct or incomplete. So I w

Ben Wiederhake 9 Nov 15, 2022
A simple telegram bot to recognize lengthy voice files to text and vice versa with multiple language support.

Voicebot A simple Telegram bot to convert lengthy voice clips to text and vice versa with supporting languages. Mandatory Variables API_HASH - Yo

Renjith Mangal 12 Oct 21, 2022
Hacktoberfest2021 - Submit Just 4 PRs to earn SWAGS and Tshirts🔥

dont contribute in this repo, contribute only in below mentioned repo Special Note For Everyone ''' always make more then 4 pull request lets you have

Keshav Singh 820 Jan 02, 2023
This Is A Python Program To Showcase Two Modules (Gratient And Fade)

Hellooo, It's PndaBoi Here! This Is A Python Program To Showcase Two Modules (Gratient And Fade). I Really Like Both Of These Modules So I Decided To

PndaBoi! 6 May 31, 2022
A python library to interact with the EarnApp API

EarnApp.py Table of contents General info Documentation Setup General info A python library to interact with the EarnApp API. Documentation First, imp

3 Dec 14, 2022
Pdisk Link Converter Telegram Bot, Convert link in a single click

Pdisk Converter Bot Make short link by using Pdisk API key Installation The Easy Way Required Variables BOT_TOKEN: Create a bot using @BotFather, and

Ayush Kumar Jaiswal 6 Jul 28, 2022
A Webhook spammer For Python

Webhooker Optimizations Asynchronous Fast & Efficient Multi Tasked Usage Put high threads/tasks for maximum impact Webhook must be valid Proof of conc

andria 1 Dec 20, 2021
ignorant allows you to check if a phone number is used on different sites like snapchat, instagram.

Ignorant For BTC Donations : 1FHDM49QfZX6pJmhjLE5tB2K6CaTLMZpXZ ignorant does not alert the target phone number ignorant allows you to check if a phon

Palenath 513 Dec 31, 2022
A bot which provides online/offline and player status for Thicc SMP, using Replit.

AlynaaStatus A bot which provides online/offline and player status for Thicc SMP. Currently being hosted on Replit. How to use? Create a repl on Repli

QuanTrieuPCYT 8 Dec 15, 2022
Heroku app to explore boardgame data

A Dashboard for the Board Game Geeks among us Link to Application As many Board Game Geeks like myself track the scores of board game matches I decide

Maarten Grootendorst 20 Nov 23, 2022
This bot is created by AJTimePyro and It accepts direct downloading url & then return file as telegram file.

URL Uploader Bot This is the source code of URL Uploader Bot. And the developer of this bot is AJTimePyro, His Telegram Channel & Group. You can use t

Abhijeet 23 Nov 13, 2022
Send song lyrics to iMessage users using the Genius lyrics API

pyMessage Send song lyrics to iMessage users using the Genius lyrics API. Setup 1.) Open the main.py file, and add your API key on line 7. 2.) Install

therealkingnull 1 Jan 23, 2022
Ethone-Selfbot - Open Source Discord Self-Bot, written in discord.py

Ethone SB Table of contents Newest open-source Discord SelfBot with useful commands and easy documentation on how to add your own and change the exist

Ethone 3 Jan 08, 2022
A wrapper for aqquiring Choice Coin directly through a Python Terminal. Leverages the TinyMan Python-SDK.

CHOICE_TinyMan_Wrapper A wrapper that allows users to acquire Choice Coin directly through their Terminal using ALGO and various Algorand Standard Ass

Choice Coin 16 Sep 24, 2022
A Python bot that uses the Reddit API to send users inspiring messages.

AnonBot By Edric Antoine A Python bot that uses the Reddit API to send users inspiring messages. When a message includes 'What would Anon do?', the bo

1 Jan 05, 2022
Métamorphose Renamer v2

Métamorphose 2 Métamorphose is a graphical mass renaming program for files and folders. These are the command line options: -h, --help Show hel

Métamorphose 129 Dec 30, 2022