GithubHelp home page GithubHelp logo

shadowcat117 / cc-117 Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 2.0 10.53 MB

A Discord bot focused on role management and displaying guild information for the Minecraft server Wynncraft.

License: MIT License

JavaScript 100.00%
discord discord-bot javascript wynncraft wynncraftapi nodejs

cc-117's Introduction

CC-117

This is a Discord bot for role management and displaying information about guilds for the minecraft server Wynncraft. It uses the public Wynncraft API to build a database of information on every guild on the server and all the players too, whether they are a member of a guild or not.

This information is then used for features such as applying roles based on in-game status and finding the least active time period for a guild so you know the perfect time to attack them!

I am working on improving core features of the bot to better support a larger number of servers before an invite link will be made available.

Commands

The bot currently features 49 commands.

A temporary manual on what the commands do and how to use the bot is available here: https://docs.google.com/document/d/1anSFPfBuMPzKJ7JwejBnpB7KMsiw-Lrk50LMfNRJt6Q/edit?usp=sharing

Quick Start

By default, the role that is able to run management related commands is set to the highest role in your server hierarchy. This can be changed via

/config_roles

After selecting this command you will be displayed a list of options for roles you want to select. Pick the role you want either by selection or typing the name, this feature works with most commands.

IMPORTANT: THE @CC-117 ROLE MUST BE ABOVE ANY OF THESE ROLES IN YOUR SERVER HIERARCHY IN ORDER FOR THE BOT TO APPLY THEM TO MEMBERS.

Roles

Admin - Role required to run various config commands. Any role above this will also be able to run. Commands marked with '*' require Admin role to run. 
Owner
Chief
Strategist
Captain
Recruiter
Recruit
Ally Owner
Ally
Champion
Hero
VIP+
VIP
Veteran
Verified
Unverified
Member of 
Administrator - member has an administrator role in Wynncraft
Moderator
Content Team
Giveaway
Events

Config Commands

/config_levelroles*

Works similar to the above command. This command is used for applying roles based on the highest combat level on a players account. You can set up 10. Currently, you will need to order them from highest to lowest and remember the order otherwise it could cause issues for other features.

To use: Run the command and selet the optoins and pick the role. The options are named "Level Role One", "Level Role Two" etc. So make one level 106, two 106, three 100, etc.

/config_levels*

This command is paired with the above. Use this to set what level is required to get that role. Unlike the previous commands, you won't be presented with an option for the value input, after you've selected the "Level One Level" option you simply have to type in the number you want for that level role, say for example 106.

/config_classroles*

Roles for letting users pick their favourite class and archetype.

/config_warroles*
/config_channels*
/config_promotions*
/config_<rank>promotions*
/config_features*
/config_values*

That's it for the config commands!

Management Commands

/setguild*

Sets the guild you want to represent. Enter the prefix or full guid name.

/addally*

Add guilds you want to classify as allies, has no effect on Wynncraft.

/removeally* 

Remove guild(s) you have set as allies

/allies*

Shows a list of allied guilds

/trackguild*

Adds a guild to your personal tracked list

/trackedguilds*

Lists tracked guilds

/untrackguild*

Untracks a guild Displays all the guilds that have been tracked in your server

/adddemotionexception*
/addinactivityexception*
/addpromotionexception*
/removeddemotoinexception*
/removeinactivityexception*
/removepromotionexception*
/createclassmessage*
/createguildeventsmessage*
/createwarmessage*
/help
/updateguild
/updateplayer
/updateranks*
/viewconfig*

More commands

Commands for the average user

/verify
/unverify
/activehours
/checkfordemotions
/checkforpromotions
/demotionexceptions*
/promotionexceptions*
/inactivityexceptions*
/sus*
/verified*
/worldactivity
/trackedguilds
/online
/lastlogins

Please refer to the linked google doc for a closer look at command functions

Database

The database used for the bot contains 2 tables by default, guilds and players. However "primary" guilds also have their own table, these are guilds that a server has chosen to represent.

The guilds table contains various information about every guild in the game such as name, prefix, level, xp, current season rating and activity for regular players and those at or above the rank of captain.

The players table contains a lot of information about players, including what guild they are in, their support and server rank, current online status among other stats.

A table for a primary guild currently only contains information for tracking the weekly playtime of the members of that guild.

Wynncraft Public API

The bot reads the data from the Wynncraft Public API, the docs for which are located here: https://docs.wynncraft.com/

It reads data relating to guilds, and their members, including their guild rank, personal rank and last login date.

cc-117's People

Contributors

gumby9000 avatar shadowcat117 avatar

Watchers

 avatar

Forkers

gumby9000

cc-117's Issues

Better system needed for priority guilds

updatePriorityGuilds will currently run 25 guilds at a time, keeping primary guilds at the front of the queue and putting secondary guilds to the back after they have been updated. This currently works, but if there are 25+ primary guilds, then only the first 25 will be updated.

Improve accuracy and implementation of guild activity

When guild activity was changed from an hourly check to quarter hourly, the implementation for it was bad. It should still use 1 column and use the current minute to determine a mini running average for that hour. This can also then allow the activity check to run every 10 minutes for more accuracy, perhaps try 5 minutes to see performance

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.