mikhad / nfr-bot Goto Github PK
View Code? Open in Web Editor NEWA utility discord bot for displaying information from the Wynncraft API, with some additional fun and QoL commands.
A utility discord bot for displaying information from the Wynncraft API, with some additional fun and QoL commands.
Create a ticketing system to replace tickettool.
starting point
When commands are being read in from file on start add category property dynamically based on which folder the command was in.
The guild category contains commands such as stats which is guild agnostic.
The category was originally called guild because it only contained the absences command for NFR, but that too has since become guild agnostic.
Slash command with sub commands
Sub command | Permission | Parameters | Functionality |
---|---|---|---|
track | ADMINISTRATOR | guild |
start or stop tracking the play time in guild for guild . Only one guild may be tracked per discord server. When run show ephemeral pop up letting them know that, asking them to confirm and telling them whether they are starting or stopping tracking |
player | anyone | player-name |
show player-name s playtime in guild since the date tracking started |
list | ADMINISTRATOR | show a list of players play-times in guild since tracking started, and when the stats were last updated (update once or twice a day) |
Store playtime data in database per guild, not server so as not to duplicate values if multiple servers track the same guild (for some reason)
Slash command with sub commands.
Sub Command | Parameters | Functionality |
---|---|---|
start | balance , channel |
Start keeping track of the guild treasury. Channel is an optional parameter, if specified treasury commands can only be run in that channel. |
deposit | amount |
Amount deposited. Stored in database with user who deposited it. |
withdraw | amount , reason |
Reason is required. Stored in db with user, and reason. |
log | entries , user |
Show withdrawal log, (with total balance at the top) optional parameter to show number of entries you'd like to see, optional parameter to see entries from a specific user |
balance | Show the current guild bank balance | |
channel | channel |
set or unset the channel used for treasury commands |
Add chatbot functionality when the bot is @mentioned
(source)[https://towardsdatascience.com/how-to-build-your-own-ai-chatbot-on-discord-c6b3468189f4]
Seperate the functions in utils.js into smaller, more relevant and cohesive categories of utility functions.
Files for:
Ability to easily add multiple pages to embeds, reachable via button interactions (buttons might need to expire after a given amount of time).
Simplify dev command system by making a dev commands folder, rather than a file name prefix. Any special treatment of dev commands in other commands like reload and help that I still wish to keep will need to be based on the folder being dev instead of the dev property being true.
The following changes are what I recorded before I started properly using git and GitHub to track my changes:
23/07/2021
Add the ability to message a given channel in a given server with a given message from the server console.
Learn express and make a dynamic website (on the same host?) to reflect some of the data about the bot, commands, servers etc. Invite link and other info from the README.
Idea
Panel like that of tickettool.xyz which will allow you to log in via discord, select a server you are admin of and contains the bot and configure the default parameters of commands that have them, and modify the settings of complex commands like trackterritores, as well as set up and create polls and send them to a channel/ store them.
Add an NFR server specific /lore command based of this bot to send an embed book of the pages of the nfr lore book.
Slash command with sub commands. To avoid extra set up run when you hold all the territories you want to track.
Sub Command | Parameters | Functionality |
---|---|---|
track | guild |
Open a thread with the set up editor |
ping | role |
role is an optional parameter telling the bot which role to ping if a territory is taken, leave blank for no ping |
channel | channel |
The channel to send territory alerts to |
track
ping
channel
Set up editor in new thread where messages from anyone other than command user are ignored, with ephemeral pointing to thread. Options include ping, channel, territories, alert for terrs being attacked (won't always happen for ter being attacked by nature of how often updates happen).
Divide territories up based on rough area, so gavel, rol, ocean, corkus, wynn, se.
Give user an embed listing all terrs currently owned by guild, along with a map.
Have recommendation to have a map of wynn open while doing this, with links to different wynn maps like official, wynndata, avacia etc.
Store settings for tracked guild in database on a per server basis
Buttons for confirm, add, remove and add & remove.
Remove:
Give user a drop-down of all currently owned terrs and ask them to check all that you don't want to track.
Add:
Give user a drop down of the rough areas and ask them to select which areas they want to add territories in, then give them a drop down or multiple drop downs to select which territories to track additionally.
Add & remove:
Give add, then give remove.
Covert codebase to typescript for more reliable code.
EDIT: Moved help command for slash commands to a separate issue.
A servers property in the command with an array of server IDs as its value. During the command parsing step the code for these commands will be added to slash commands but they will only be registered to the given servers.
WynnAPI class that extends API class
Utility slash command with sub commands, with different perms for different sub commands. Take a look at how DYNO implements its /vote command.
# | Sub Command | Permission | Parameters | Functionality |
---|---|---|---|---|
1 | Channel | ADMINISTRATOR | #channel |
Set a channel in which all (non bot) messages will receive ๐ and ๐ reactions. Do it again to disable |
2 | On | everyone | message-text |
Add ๐ and ๐ to this message, which will contain message-text |
3 | Message | ADMINISTRATOR | channel id , message id |
Add ๐ and ๐ to a message |
4 | Builder | ADMINISTRATOR | Create a thread where the vote set up will be done & link it in an ephemeral. All messages in the thread by anyone other than the person who ran the command will be deleted. In the thread go through choosing: List of things being voted for (max 25); number of people voting (or specific people, or a specific rank); Desired majority, if any. If specified voting will end when that majority is reached (rounded to the nearest possible with the number of people voting); duration of poll (default of a day, max of one month); should people be able to change their vote; should people be able to see the results before voting. | |
5 | Complex | ADMINISTRATOR | ... | Shorthand for the builder command, all done in one command |
Ongoing votes need to be stored in the database on a per server basis
Add a help command function for slash commands to parse and display the information already present in the slash commands.
Slash command with sub commands for the various options that moto-bot provides with its arrows.
guild parameter, optional sub command parameter
Sub command | Functionality |
---|---|
Info | General guild info like owner, members & online, created, terrs. This is the default if no sub command is specified |
Online | Table of online members in order of rank, sub ordered alphabetically |
Chiefs | Table of chiefs with world if online |
Strategists | Table of strategists with world if online |
Captains | Table of captains with world if online |
Recruiters | Table of recruiters with world if online |
Recruits | Table of recruits with world if online |
xp | Table of members and their xp contributions, in order of most donated |
When called like roll, it'll say something like
Rolled d20: 13
Or you can reply to the output of someone else's deathroll command and it will automatically use the result of their roll as the number of sides for the new roll.
Change all commands to return a code after execution representing what happened. If command executed successfully, or made api calls and failed put command on cool-down.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.