Moji is a self-hosting Discord bot that tracks custom emojis usage.
Moji is a self hosting Discord bot which tracks custom emojis usage. It can track both non-animated and animated emojis from messages and reaction messages.
Prefix: !
!emotes
Displays all of the server emojis name and its count sorted in descending order. If there are emojis with duplicate counts, then the emojis name is used to sort it.
sudo apt-get update
sudo apt-get install python3.6
python3 -m pip install -U discord.py
python3 -m pip install pymongo
First two steps are only required if you do not have ≥python 3.6 installed
You don’t have to get python 3.6, but any version you install must be 3.6 or higher. If you get python 3.7, then it would be
sudo apt-get install python3.7
Press enter for each command you type
Mark sure to tick the
Add Python # to PATH
box for the Python installerLeave everything default for the Git installer
py -3 -m pip install -U discord.py
python -m pip install pymongo
Press enter for each command you type
Setting up Moji requires yourself to host it.
Start Free
or Try Free
buttonCONNECT
buttonAdd Your Current IP Address
button and click the Add IP Address
Create a Database User
and create your username and your password. Remember your username and your password as you will need it for step 8.Choose a connection method
button and choose Connect using MongoDB Compass
buttonpassword
with the password you created from step 8.CREATE DATABASE
button and name your database and collection (Optional)New Application
button.Application
and click Create
Bot
and click the Add Bot
buttonOAuth2
bot
under scopes
.Bot Permissions
, check Manage Emojis
, Send Messages
, Manage Messages
, Use External Emojis
, and Add Reactions
.scopes
, select your guild and click Authorize
. Check that your bot is in your guild. It should be offline.Bot
on the left panel and click either the Copy
button or Click to Reveal Token
to get your bot token.git clone https://github.com/RyanLuong1/Moji.git
cd /Moji
and type pip3 install -r requirements.txt
..env
by typing touch .env
and opening it through the terminal or through your preferred text editor. It should contain the following:
DISCORD_TOKEN= "YOUR_DISCORD_TOKEN"
CONNECTION_URL= "YOUR_CONNECTION_STRING"
"YOUR_DISCORD_TOKEN"
and "YOUR_CONNECTION_STRING"
with their respective token and connection stringCommandEvents.py
and EmoteCommand.py
and replace emotes_db
and emotes_collection
with your respective database and collection name. (Only do this if you gave your database and collection a name. Otherwise, a database named “emotes_db” and a collection named “emotes_collection” will be created and shown in MongoDB Compass)
DISCORD_TOKEN
is from step 10 ofDiscord Bot Setup
CONNECTION_URL
is from step 12 ofMongoDB Setup
Your respective database name is from step 13 of
MongoDB Setup
Your respective collection name is from step 13 of
MongoDB Setup
python3 emojibot.py
. Now your emojis are loaded to the database and ready for its count to be collected by Moji as long as it is online.cd Downloads
git clone https://github.com/RyanLuong1/Moji.git
cd Moji
and type pip install -r requirements.txt
.env
by typing type nul > .env
and opening through the command prompt or through your preferred text editor. It should contain the following:
DISCORD_TOKEN = "YOUR_DISCORD_TOKEN"
CONNECTION_URL = "YOUR_CONNECTION_STRING"
"YOUR_DISCORD_TOKEN"
and "YOUR_CONNECTION_STRING"
with their respective token and connection string.CommandEvents.py
and EmoteCommand.py
and replace emotes_db
and emotes_collection
with your respective database and collection name. (Only do this if you gave your database and collection a name. Otherwise, a database named “emotes_db” and a collection named “emotes_collection” will be created and shown in MongoDB Compass)
DISCORD_TOKEN
is from step 10 ofDiscord Bot Setup
CONNECTION_URL
is from step 12 ofMongoDB Setup
Your respective database name is from step 13 of
MongoDB Setup
Your respective collection name is from step 13 of
MongoDB Setup
python emojibot.py
. Now your emojis are loaded to the database and ready for its count to be collected by Moji as long as it is online.TypeError: __new__() got an unexpected keyword argument 'deny_new'
Solution. Discord most likely have updated discord.py. Type python3 -m pip install -U discord.py
TypeError: __init__() got an unexpected keyword argument 'requote'
Solution. Read Rapptz’s response. Type pip3 install -U yarl==1.4.2
the dns response does not contain an answer to the question
Make sure the connection string you put in .env is exactly the one you use to connect to MongoDB Compass.
Ryаn#6575