Introducing - Mccities Statistics

Turkey

Well-Known Member
Former Staff
PurpleTurkey
PurpleTurkey
Mar 22, 2017
1,429
2,613
113
24
4 Privet Drive
Hey there! Over the past month and a half, I've been working on an McCities-related discord bot, that some of you might find interesting and useful. I thought this would be a good place to share it. Hopefully you can find it useful on your own servers :)



What it is

McCitiesStats#3098, is a discord bot created by myself (PurpleTurkey). It has a variety of commands that gather literal server data, player information, and more. As stated above, this has been in the works for about a month and a half, and is constantly updating. In this post, I will share some highlights/cool features the bot has to offer, as well as the invite link!

1565149473540.png


Commands

The bot currently offers 12 usable commands, that can be grouped together in 3 different categories. Here are some of the most used commands from each category

Server Commands (Commands that gather server related information)

.status - This brings up server ping information. Including (up to) 12 players online, and an estimate of the lag the server might be experiencing.

.vote - This is a popular one. It basically brings up all voting links.

1565149453994.png


Forums Commands (Commands that gather forums (and sometimes player) related information

.banktop - This brings up the top 5richest players (by bank balance). This can filtered to show 1 through 20 different different players bank balances.

.general - (Along with .announcements, and .market), this brings up the most recently created posts in that section - general discussion.

1565149434381.png


Bot Commands (Non McCities Related Commands & Bot Specific Commands)

.stats (@discordUser) - This brings up EXP information, IDs, PFP, and names of the tagged discord user

.skin (minecraftPlayer) - This brings up UUID and skin links for the mentioned Minecraft player, along with an image of the skin fromt front.


1565149405934.png


Misc Items

- Using a basic model, the bot has been 'trained' to detect a specific type of question. Anytme a message is sent in a similar context to "What is the server ip?", the bot will respond with the ip. (If you add the bot and want something similar, let me know)

1565149597723.png


- Custom player join messages (specific to a server, and dms the user), along with automatic role adding.

- There are also built in spam filters (currently not in use), but can be activated on request.


How To Add the Bot

- The bot is minimally invasive, and only requires 1 'admin' permission, chat management, allowing it to delete messages related to its commands

Click here for the link to add the bot

- The bot is constantly changing/updating. If you want to spam test the bot (without adding it to your server), or if you want to stay in touch with the updates, you can join my testing server (listed below).

Click here for the server link


Thanks for reading !
 

Attachments

ThatOneGuy4205

Well-Known Member
Jul 11, 2017
121
1,488
93
Never gonna tell, UK
This certainly looks interesting to say the least. Maybe eventually you could add a command to check how many times a certain player has killed/been killed, the total amount of money a player has earned/spent although I don't know how that could be implemented, but could prove interesting nonetheless
 

Turkey

Well-Known Member
Former Staff
PurpleTurkey
PurpleTurkey
Mar 22, 2017
1,429
2,613
113
24
4 Privet Drive
This certainly looks interesting to say the least. Maybe eventually you could add a command to check how many times a certain player has killed/been killed, the total amount of money a player has earned/spent although I don't know how that could be implemented, but could prove interesting nonetheless
These along with other in game stats, these are definitely some that I would like to add. However, there is currently no website/api where the bot can gather this information. For example, the bot gathers all it's forums related information, from the forums code itself. Here's an example of the html information it needs for the .announcements command:

<a id="js-XFUniqueId40" href="https://mccities.com/threads/introducing-crates-crate-key-giveaway.18543/unread" data-xf-init="preview-tooltip" data-preview-url="https://mccities.com/threads/introducing-crates-crate-key-giveaway.18543/preview" data-tp-primary="on">Introducing Crates! **CRATE KEY GIVEAWAY**</a>

Similarly, commands like .status, gathers its information from pinging (sending/receiving packets) to the server itself, and uses that type of information. To be able to return values for "ingame commands", such as /bal, /ar time, /g player, there woul d have to be one of two things. Either a client account on the server 24/7 (which is not feasible due to the complexity of having it work smoothly, along with lag issues), or a separate page containing those statistics. The latter is more easy to be implemented, but still not "easy enough" as it would require the server to pull this data at will push it every time a command was called.

Good idea though, thanks for the suggestion! I'm trying to think of better ways to get this information, as it would make for some cool commands :p