This project is deprecated! Visit https://github.com/peterthehan/discord-emoji-log-bot.
Holo is a Discord statistics bot that tracks user emoji usage. Holo is capable of tracking emojis from both messages and message reactions.
Current and relevant server emojis make for happy users!
Prefix: $, @mention
-
$count [@mention] [all|server|default]
@mention
Filter user. If omitted, defaults to include all server members.
e.g. $count @Miku all
all|server|default
Filter emojis by type and list emojis by count in descending order.
e.g. $count all -
$rate [@mention] [all|server|default]
@mention
Filter user. If omitted, defaults to include all server members.
e.g. $rate @Miku all
all|server|default
Filter emojis by type and list emojis by count per day in descending order. e.g. $rate all -
$recommend
Recommend unused emojis for removal by finding the intersection between the 10 lowest results of the count and rate commands. -
$users [:emoji:]
:emoji:
List emoji users by count in descending order.
e.g. $users 🤔
Holo requires you to host her yourself! Read the following for setup instructions.
The following instructions assume you are signed in with a Google account.
Be aware that Firebase has a generous free plan for hobbyists but exceeding certain limits will stop your service for the month. If you're using Holo on a small server, you have almost nothing to worry about.
- Go to Firebase.
- Click
GO TO CONSOLE
, located on the site's navigation bar. - Create a new project.
- Go to
Database
, located on the sidebar, and click theGET STARTED
button.- Under the
DATA
tab, take note of the database URL (e.g.https://YOUR-PROJECT-NAME-HERE.firebaseio.com/
) associated with your project. You will need this later.
- Under the
- Go to the
RULES
tab and set your rules to the following:
// These rules don't allow anyone read or write access to your database
{
"rules": {
".read": false,
".write": false
}
}
- On the sidebar, click the gear icon and go to
Project settings
. - Go to the
SERVICE ACCOUNTS
tab and click theGENERATE NEW PRIVATE KEY
button. This will download a unique file containing Firebase Admin credentials. - Rename the file to
serviceAccountKey.json
.
Keep this
serviceAccountKey.json
credentials file private!
The following instructions assume you are signed in with a Discord account.
- Go to Discord's My Apps page.
- Create a new app.
- Click the
Create a Bot User
button and confirm. - You can create an invitation link for your bot with
https://discordapp.com/oauth2/authorize?client_id=YOUR_DISCORD_BOT_CLIENT_ID_HERE&scope=bot
. - Click
click to reveal
to view your bot's token.
Keep your Discord bot token and any file containing it private!
- Type
git clone https://github.com/peterthehan/holo.git
. - Type
cd holo/
andnpm install
. - Move the
serviceAccountKey.json
file to the root of thesrc
folder. - Create a new file named
config.json
at the root of thesrc
folder. The file should contain the following:
{
"token": "YOUR_DISCORD_BOT_TOKEN_HERE",
"databaseURL": "YOUR_DATABASE_URL_HERE",
"reaction_timeout": "30000",
"pager_timeout": "60000",
"prefix": "$",
"owner_id": "YOUR_DISCORD_ACCOUNT_ID_HERE"
}
token
is from the Discord Bot Setup section, step #5.
databaseURL
is from the Firebase Setup section, step #4i.
reaction_timeout
(in milliseconds) is how long Holo looks at each message for user reactions. Keep it somewhere between 15000 and 30000 for optimal performance.
pager_timeout
(in milliseconds) is how long Holo looks at each command message for pagination. Keep it somewhere between 30000 and 60000 for optimal duration.
prefix
is your preferred command prefix. If omitted, commands can be used by mentioning the bot in place of the command prefix. e.g. @Holo ping
owner_id
is your Discord account ID. Navigate toUser Settings
and under theAppearance
tab, enableDeveloper Mode
. Right-click your name to open up the context menu which will display the option toCopy ID
.
- Type
npm start
ornode src/index.js
to run. Holo is ready to log!
{
"guilds" : {
"258167954913361930" : {
"channels" : {
"258167954913361930" : {
"name" : "general"
}
},
"emojis" : {
"363631910787874819" : {
"name" : "Haha",
"url" : "https://cdn.discordapp.com/emojis/363631910787874819.png"
},
"messages" : {
"2017-9" : {
"emojis" : {
"-Kw-LDqFOmFlHKZsoymH" : {
"channel" : "258167954913361930",
"identifier" : "363631910787874819",
"isDefault" : false,
"isReaction" : false,
"timestamp" : 1507539348841,
"user" : "206161807491072000"
}
}
}
},
"name" : "cqdb",
"url" : "https://cdn.discordapp.com/icons/258167954913361930/4cb15bdf376886559a8f8159d4aaa779.jpg"
}
},
"users" : {
"206161807491072000" : {
"name" : "Miku#0039",
"url" : "https://cdn.discordapp.com/avatars/206161807491072000/5720fe7b23f79105d764d6d1ca8cad88.png?size=2048"
}
}
}