Git Product home page Git Product logo

wiseoldman-discord-bot's Introduction

Wise Old Man logo

πŸ”— www.wiseoldman.net

The Open Source Old School Runescape progress tracker.

The Wise Old Man is a web app (and API) that tracks and measures your Old School Runescape player progress. Built on top of the OSRS hiscores, it allows you to keep track of your gains, participate in group competitions, collect achievements and much more.

Website | Discord | Patreon


πŸ‘ͺ Related projects

Although this is the core repository, some related repositories have been created to expand the functionality of this project.


πŸ› οΈ API

We also offer a REST API for developers and encourage you to create your own apps and integrations with it. You can read the API documentation at: https://wiseoldman.net/docs


πŸ“š Project structure and stack

The repository is currently divided into 3 components:

  • Server: (The backend & API)

    • Node.js
    • TypeScript
    • PostgresSQL
    • Redis
    • BullMQ
    • Express
    • Prisma
    • Jest
  • App: (The web app)

    • Next.js 14 (App Router)
    • TailwindCSS
    • HeadlessUI
    • RadixUI
  • Docs: (The API documentation)

    • Docusaurus

πŸ’¬ Suggestions and bugs

Have a suggestion or a bug to report? Click here to create a issue

Have something else you'd like to discuss? Join us on discord


🀝 Contributing

Each component of the repository has it's own build and development process, check the documentation for each below:

Help expand and improve the Wise Old Man API: Server / API Development Guide

Help expand and improve the Wise Old Man Web App: App Development Guide

Help update or improve the Wise Old Man API Docs: Docs Development Guide

wiseoldman-discord-bot's People

Contributors

aleccaputo avatar aluminoti avatar bitomic avatar dependabot[bot] avatar jakesterwars avatar joeydotdev avatar jonxslays avatar psikoi avatar rorro avatar sethmare avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

wiseoldman-discord-bot's Issues

Aliases for skills

Add aliases for:
smithing (smith, sm), firemaking (fm), runecrafting (runecraft, rc), hitpoints (hp), attack (att), defense (def), strength (str)...

[Feature Suggestion] Allow tagging discord users in "username" fields

It would be nice if /stats username:@Psikoi (discord user tag) worked, for scenarios when you don't know your friend's current username.

It would try and fetch the current alias (from our database) to that discord tag, and use it as the username parameter for the command. Not too different from the way we currently "infer" usernames when they are not provided.

Currently

getUsernameParam

  • if has username param, use that
  • otherwise, use the alias for the user that called the command

Ideal

getUsernameParam

  • if has username option
    • if it's a user tag <@userId>, use the alias for that userId
    • otherwise, use that username option value as the username for the WOM request
  • otherwise, use the alias for the user that called the command

Configuration help

I think it would be more user friendly to add some kind of help for the !config command. The current wom!help command has a lot of elements I would imagine in this command, but I think !config could afford to bring up more details.

Showing the set channel for each type of announcement would help give a brief overview to admins, and would probably help somebody less familiar with the bot to know the proper language to use the command.

Example of what to show

Prefix
Group name and/or id
Number of members
Channel:default (channelname)
Channel:competition-status (channelname or β€œdefault” if set to default)
Etc.

It doesn’t have to be exactly like this, but i think something like this would improve the user experience

[MOVED] Command to preview competition summaries for other metrics

Originally wise-old-man/wise-old-man#822

Now it's possible to preview competitions for other metrics on the site, it would make sense to add this feature to the bot commands also.
For example if I was hosting a GWD event, I wouldn't create 4 separate competitions any more, I would create one for Bandos, and then preview it for Armadyl/Kril/Zilyana. It would be great to get the ability to preview the summaries for each on the bot too, atm it would only be possible to get the summary for Bandos.

i.e. !group competition 2981 --arma

Add useful tip for invalid metrics

From Boom on discord:

Maybe change the Tip example to show a metric with underscores, so people know they have to use them for multi-word metrics?

image

Allow capitalisation in commands

In the example below !group hiscores zulrah worked. !group hiscores Zulrah didn't.
Interestingly it appears to have the players in the right order, but all with 0kc and an invalid metric name in the title.

image

Duration for competition announcement

image
I have a month long competition scheduled to start in about a week. When it was announced in Discord, the duration said undefined even though i did set a duration.
image

Ability to look up ended competitions only

Add --past or --ended to !group competition so you see the most recent ended competition. This currently exists for viewing ongoing and upcoming competitions by themselves, but not past competitions.

Screenshot_103

Mentioning the bot

This suggestion is two parts:

1- When you mention @Wise Old Man, send a message showing the server's prefix. This is helpful for people wanting to use the bot on an unfamiliar server, or for somebody who forgot what the set prefix was.

2- Treat mentions of @Wise Old Man as if the prefix was being used. In addition to being useful for the same reasons as the first suggestion, this can help users interact with the intended bot when multiple bots use the same prefix. Ex. @Wise Old Man help would be the same as wom!help, and @Wise Old Man gained would be the same as !gained.

Broken Record notifications

Suggestion:
Add a new announcement type for groups that announces when a group record is broken.

Example: Psikoi has 100 zulrah kills in a day as a record. Sethmare breaks it with 105 in a day. Bot sends an announcement saying, "Sethmare has broken Psikois' daily record of 100 zulrah kills with 105 zulrah kills"

Make this announcement type toggle-able in case some servers don't want record announcements but want other types of announcements.
Possibly split into "XP", "bossing", and "activities" records. PVM clans may not care for XP records, and skilling clans may not care for bossing records.

Functionality/command ideas

Starting point: wise-old-man/wise-old-man#50

Current planned commands:

Command Logic Rendering
!config group {groupId} βœ”οΈ Done βœ”οΈ Done
!config prefix [!/-/--/+/++/$] βœ”οΈ Done βœ”οΈ Done
!config announcement-channel {#channel}/here βœ”οΈ Done βœ”οΈ Done
!stats {username} βœ”οΈ Done βœ”οΈ Done
!bosses {username} βœ”οΈ Done βœ”οΈ Done
!activities {username} βœ”οΈ Done βœ”οΈ Done
!update {username} βœ”οΈ Done βœ”οΈ Done
!gained {username} [--day/--week/--month/--year] βœ”οΈ Done βœ”οΈ Done
!achievements {username} βœ”οΈ Done βœ”οΈ Done
!group competition [--ongoing/--upcoming] βœ”οΈ Done βœ”οΈ Done
!group competitions βœ”οΈ Done βœ”οΈ Done
!group info βœ”οΈ Done βœ”οΈ Done
!group members βœ”οΈ Done βœ”οΈ Done
!group hiscores {metric} βœ”οΈ Done βœ”οΈ Done
!group gained {metric} [--day/--week/--month/--year] βœ”οΈ Done βœ”οΈ Done
!group records {metric} [--day/--week/--month/--year] βœ”οΈ Done βœ”οΈ Done

Hooks/events

Event API Hook Bot Message
Group Member Joined ❌ Not done βœ”οΈ Done
Group Member Left ❌ Not done βœ”οΈ Done
Competition Created ❌ Not done βœ”οΈ Done
Competition Started ❌ Not done βœ”οΈ Done
Competition Ended ❌ Not done βœ”οΈ Done
Competition Starting ❌ Not done βœ”οΈ Done
Competition Ending ❌ Not done βœ”οΈ Done
Competition Top 3 Changed ❌ Not done βœ”οΈ Done
New Member Achievement ❌ Not done βœ”οΈ Done

Add player type to !stats message

Show whether a player is a hcim, uim, etc along with player stats when !stats is used. Maybe player's build and country flag as well.

image

Commands for gained EHB and EHP

Would be nice to have gained and group gained commands also work for EHP and EHB. Something like !gained --ehp --week and !group gained --ehb --week.

The gained commands only takes period argument at the moment though.

config default channel

When configuring the default channel for the bots broadcast messages using the following command:
!config channel:default here
the bot will first of all produce the invalid channel preference type error before actually telling it updated the default channel.

Here is a screenshot of the what is happening in discord:
ss

I guess it triggers the warning for invalid channel before it interprets "here", but haven't looked into the code yet.

Issue with some commands not

After you've changed the command prefix from the default ! the help info provided by the failed track doesn't use the correct prefix
image
^ where the server prefix is ++

Use custom commands in other servers

Though some custom commands are only relevant to the WOM server, it would be helpful to be able to allow some custom commands to be used outside of the wise old man server. To keep it easy to edit the custom commands, I suggest adding something like the bottom line here:

command: "runelite",
message: "Enabling the XP Updater plugin on Runelite is an easy, reliable way to keep your Wise Old Man profile up to date."
image: "https://imgur.com/tv0Jro8”
type: public

This would hopefully keep it easy to change/add for mods even if they don’t have much coding experience (like me)

Boss gain bot command

I think it would be cool to see just the bosses that have been worked on in a period :)

-Individual lookup: !gained --bosses or !bosses gained would bring up the same thing as doing !gained, but all XP/minigames would be excluded.

-Group lookup: !group gained bosses would bring up the group's overall EHB for the period, as well as the total KC for each boss that had "gains" in that period (sorted biggest gain to smallest gain). For example:

Group name: XXXXX
1 Week Boss Gains

  • EHB: XXX
  1. Vorkath: 520
  2. COX: 100
  3. Venenatis: 10

These filters/metrics could potentially be expanded to XP/activities as well

Bot command for capitalization

As a workaround for name capitalization, we should add a command, similar to !setflag, to set capitilization for usernames. A command example would be:

!setcaps {userID / username} {CAPITALIZED NAME}

So for me:

!setcaps 1709 SeThMaRe

This would only be useable in a specified channel to help moderate these changes.

If we decide that this action requires admin approval (which might not be necessary), maybe we could add reactions to the bot's response that only admin/mods/etc. can use to approve/reject capitalization (checkmark to approve, X to reject)?

Add "track" as an alias for "update"

Pros: "Track" makes sense as an alias for both first time requests (i.e. user is not yet being tracked) and for player updates (tracking xp gains)

Cons: Nothing

Add new gain lookup command

Suggestion:

Make something like !gained --boss/!gained --xp to show only boss gains/xp gains for an individual, instead of mixed together.

!gained --boss would show a breakdown of each boss killed during the chosen period, along with EHB (and maybe a total number of bosses killed?).

!gained --xp would show the grand xp total, then the breakdown of each skill contributing to the total, along with EHP.

Quick group competition creation

Suggestion:

Add an option to start a new group competition from the group's page. This would take you to the "New competition" screen, with the group's name auto-filled. You would still need a passcode to save the competition.

Two options I had in mind would be:
a) Beginning or end of the competition list
Screenshot_105

b) In the group edit menu:
Screenshot_106

!setflag - Bot response to include discord name of command user

image

The bot should also respond with the discord name (e.g Boom#0675 - not the nickname) of the person using the command. This will serve as a record of who has requested a flag for a specific rsn and allow us to take action to prevent repeated abuse of the feature if someone is trolling and setting incorrect flags for people they don't have permission from.

Discord bot push top competitors in !status update

currently the !config channel:competition-status here command adds the status of the competition, which informs the discord server of competition creation, starting in 24h, 6h, 1h, 30 min, 5 min, when comp starts and when competition ends in 24h, 6h, 1h, 30 min, 5 min, and when competition ends with results.

It would be great to add the standings to that command or create a new one that allows the top participants to be shown. Currently my discord server is constantly asking the bot '!group competition ongoing'. It would be cool to send a every 12hr or 24 hr automatic push with the results to the channel.

I talked about this on the wise-old-man discord support channel.

Bugs when using the mobile website.

Hi!

First of all I would like to say I really like the website, it’s amazing!
I found 3 bugs on the website and have 1 small suggestion.
All bugs are found on iOS using Safari (have not checked other webbrowsers).

1: When looking at the overview on mobile, the dates underneath the graph overlap.
BFF68715-3BCF-4D8D-993C-6992BC1B150D

2: When selecting a custom time range, the lowest row of dates can’t be tapped on.
DC75C65C-2F90-485D-A4A8-25AB127DDFD7

3: When opening the menu from the top right corner, the lowest 1-2 menu items can’t be tapped on.
383A25B3-27D7-47C5-B729-F17A26D28B80

(4: I would suggest switching the graphs with the gained exp. So the graphs are at the bottom.)

Auto-update instructions

This one should be pretty simple, it might be helpful to create a command that instructs users on how to set up RuneLite XP updater. This would make it easier for us to show people how to do it. Maybe an imbeded screenshot or gif or something.

Gained tab on website not sorting users alphabetically

Our clan gives points to users depending how much exp they got each week.
Whilst checking it, I've noticed you can sort the list by column headers (rank,start,end,gained) except name.
I was wondering if this was intended that you can't sort names alphabetically or if it's a bug.
Screenshot_342
It would make tracking users gained exp and giving points for them a lot quicker if we could sort names alphabetically, if this were to be resolved.
Thank you for your consideration

Show "Name Change ID" on confirmations

As shown in this example, it would be useful to show the "name change id" to determine which name change approved/denied/failed.

i.e. Failed to approve name change 48504. or βœ… Name change 48499 approved: Kbd eez β†’ Kq p

Screenshot_21

Progress to next level command

Small enhancement based on the Old School Bot's +lvl command. I really like this command because it shows the player's current level and their progress to the next level.
Screenshot_35

I think it would make sense to add this or something similar to the WOM bot for those trying to highlight one particular skill (maybe with a percentage as a bonus?)

Add competition winners to bot messages

Currently, using !group competition shows ongoing and past competitions. I think it would be cool to see who won the ended competitions, as well as the amount they won with.

Screenshot_102

Example:

Winner: DragonSlayer73 - 2000 kills

Add private moderation commands

Private Moderation commands, only accessible in the WOM discord server, by moderators+

Group verification command

Actions:

  • Sends API request to verify the group
  • Adds Group Leader roles to users tagged
  • Sends a log message to #group-leaders-log with the format: {GroupName} ({GroupId}) - @{UserTag})

Examples:

!verify 139 @Psikoi @sethmare
!verify 501 @Zezima


Group/Competition Verification code Reset

Actions:

  • Sends API request to reset code
  • DMs user with the new code

Examples:

!reset-group-code 139 @Psikoi
!reset-competition-code 501 @Zezima

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.