Giter Club home page Giter Club logo

dinkplugin's Introduction

Dink

Dink sends webhook messages upon noteworthy in-game events. While Dink supports the Discord webhook format (with rich embeds and optional screenshots), it also includes additional metadata that allows custom webhook servers to analyze messages or even generate their own messages. Examples of the additional metadata can be found here. This project was forked from UniversalDiscordNotifier, but has more features, reliability, configurability, testing, and maintainer activity.

Have a suggestion (e.g., new notifier, additional data), bug report (as rare as it may be), or question? Let us know on our issue tracker!

Basic Setup

To use this plugin, a webhook URL is required; you can obtain one from Discord with the following steps:
If you already have a link, skip to step 4.

  1. Click the server name (at the top-left of your screen) and select Server Settings.
  2. Select the Integrations tab on the left side and click Create Webhook (if other webhooks already exist, click View Webhooks and New Webhook).
  3. Click the newly created webhook, select the target Discord channel, and click Copy Webhook URL.
  4. Paste the copied link into the Primary Webhook URLs box in the Dink plugin settings.
  5. (Optional): If you would like different webhook URLs to receive different sets of notifications, you can instead paste the link into each relevant box in the Webhook Overrides section. Note: when a notifier has an override URL, the notifier ignores the primary URL box.

Notifiers

  • Death: Send a webhook message upon dying (with special configuration for PK deaths)
  • Collection: Send a webhook message upon adding an item to your collection log
  • Level: Send a webhook message upon leveling up a skill (with support for virtual levels and XP milestones)
  • Loot: Send a webhook message upon receiving valuable loot (with item rarity for monster drops)
  • Slayer: Send a webhook message upon completing a slayer task (with a customizable point threshold)
  • Quests: Send a webhook message upon completing a quest
  • Clue Scrolls: Send a webhook message upon solving a clue scroll (with customizable tier/value thresholds)
  • Kill Count: Send a webhook message upon defeating a boss (with special configuration for personal best times)
  • Combat Achievements: Send a webhook message upon completing a combat task (with customizable tier threshold)
  • Achievement Diaries: Send a webhook message upon completing an achievement diary (with customizable difficulty threshold)
  • Pet: Send a webhook message upon receiving a pet
  • Speedrunning: Send a webhook message upon completing a quest speedrun (with special configuration for personal best times)
  • BA Gambles: Sends a webhook message upon receiving high level gambles from Barbarian Assault
  • Player Kills: Sends a webhook message upon killing another player (while hitsplats are still visible)
  • Group Storage: Sends a webhook message upon Group Ironman Shared Bank transactions (i.e., depositing or withdrawing items)
  • Grand Exchange: Sends a webhook message upon buying or selling items on the GE (with customizable value threshold)
  • Trades: Sends a webhook message upon completing a trade with another player (with customizable item value threshold)
  • Leagues: Sends a webhook message upon completing a Leagues IV task or unlocking a region/relic
  • Chat: Sends a webhook message upon receiving a chat message that matches a user-specified pattern

Other Setup

Some notifiers require in-game settings to be configured to send chat messages upon certain events (so these events can serve as triggers for webhook notifications).

  • Collection notifier requires Settings > All Settings > Chat > Collection log - New addition notification (or New addition popup) to be enabled
  • Pet notifier recommends Settings > All Settings > Chat > Untradeable loot notifications to be enabled (which requires Settings > All Settings > Chat > Loot drop notifications) in order to determine the name of the pet
  • For Kill Count notifier, ensure you do not enable Settings > All Settings > Chat > Filter out boss kill-count with spam-filter (note: this setting is already disabled by default by Jagex)

Example

img.png

Advanced Features

  • Multiple webhook urls are supported; simply place each on a separate line
  • Each notifier can send webhook messages to separate "override" urls
  • Screenshots can be individually configured for each notifier
  • Screenshots are compressed if needed to comply with Discord limits
  • The chat box (and private messages above chat) can be hidden from screenshots
  • The plugin can skip notifications for player names that do not comply with the user-configured RSN filter list
  • Users can choose whether their webhook messages are sent in Discord's rich embed format or a traditional format
  • The player name in Discord rich embeds can be linked to various tracking services (from HiScores to Wise Old Man)
  • Discord rich embed footers can be customized with user-specified text and image url
  • When network issues occur, Dink can make repeated attempts to send the webhook (with exponential backoff)
  • Notifications can be sent to Discord Forum Channels; append ?forum to the end of the webhook url to create a new thread per message or use ?thread_id=123456 to post to an existing forum thread (be sure to change 123456 with the actual thread ID)
  • Character metadata can be sent to custom webhook handlers on login for tracking relevant statistics.

Chat Commands

Export Current Configuration via ::dinkexport

Dink allows you to export your current plugin configuration to the clipboard via the ::dinkexport chat command.

You can share this produced JSON to friends who want to send similarly configured messages.

This export includes settings across all of the notifiers, but omits webhook URLs. If you also want to include webhook URLs in the export, you can use the all parameter to the command: ::dinkexport all.

If you only want to export the webhook URLs, run the ::dinkexport webhooks chat command.

You can export just the settings for select notifiers.
Simply run: ::dinkexport <notifier section header name without spaces>.
For example: ::dinkexport pet or ::dinkexport collectionlog.

Examples

  • Export notifier settings, primary webhook URLs & webhook override URLs
    ::dinkexport all
  • Export Slayer & BA Gambles Notifier settings
    ::dinkexport slayer bagambles
  • Export webhook overrides only
    ::dinkexport webhookoverrides
  • Export all webhooks & the Levels notifier settings:
    ::dinkexport webhooks levels

Import Configuration via ::dinkimport

With the output of the above command (::dinkexport) copied to your clipboard, you can merge these settings with your own via the ::dinkimport chat command.

This import can replace all of your notifier settings. However, webhook URL lists, filtered RSNs, and filtered item names for the loot notifier would be combined, rather than outright replaced. If you would like all settings overwritten rather than merged during import, simply press the Reset button at the bottom of the plugin settings panel to clear out all settings (including URLs) before running ::dinkimport.

After an import, if the dink plugin settings panel was open, simply close and open it for the updated configuration to be reflected in the user interface.

Note: There is no undo button for this command, so consider making a backup of your current Dink configuration by using the ::dinkexport all command explained above and saving that to a file on your computer.

Warning: If you import override URLs for a notifier (that previously did not have any overrides), this will result in the plugin no longer sending messages from that notifier to your old primary URLs. As such, you can manually add your primary URLs to the newly populated override URL boxes so that notifications are still sent to the old primary URLs.

Get your Dink Hash via ::dinkhash

Dink notification metadata includes a player hash that custom webhook servers can utilize to uniquely identify players (persistent across name changes).

You can obtain your dink hash via the ::dinkhash chat command. Feel free to provide this value to third-party services that may request it.

Get Current Region ID via ::dinkregion

The death notifier allows you to customize any region that should be ignored. This is particularly relevant for ultimate ironmen (UIM) who frequently use particular locations to deathbank/deathpile.

To facilitate this process, the ::dinkregion chat command outputs the player's current region ID.

For example, Prifddinas spans the following region IDs: 12894, 12895, 13150, and 13151.


Notifier Configuration

Most of the config options are self-explanatory. But the notification messages for each notification type also contain some words that will be replaced with in-game values.

All messages:

%USERNAME% will be replaced with the username of the player.

Death:

%VALUELOST% will be replaced with the price of the items you lost. If you died in PvP, %PKER% will be replaced with the name of your killer.

By default, to avoid spam, Dink will ignore deaths from the following safe activities/areas: Barbarian Assault, Castle Wars, Chambers of Xeric (CoX), Clan Wars, Creature Graveyard of Mage Training Arena, Last Man Standing (LMS), Nightmare Zone (NMZ), Pest Control, player-owned houses (POH), Soul Wars, TzHaar Fight Pit. However, PvM deaths as a hardcore group ironman are not considered to be safe (and will trigger a notification in these areas). Lastly, Dink makes exceptions for Inferno and TzHaar Fight Cave; deaths in these areas do trigger notifications (despite technically being safe).

Note: If Distinguish PvP deaths is disabled, the message content will be the non-PvP version.

Collection:

%ITEM% will be replaced with the item that was dropped for the collection log.

%COMPLETED% will be replaced with the number of unique entries that have been completed.

%TOTAL_POSSIBLE% will be replaced with the total number of unique entries that are tracked in the collection log.

Note: %COMPLETED% may not be populated if the Character Summary tab was never selected since logging in.

Level:

%SKILL% will be replaced with the skill name and level that was achieved

%TOTAL_LEVEL% will be replaced with the updated total level across all skills.

%TOTAL_XP% will be replaced with the updated total experience across all skills.

Loot:

%LOOT% will be replaced with a list of the loot and value of said loot

%TOTAL_VALUE% will be replaced with the total value of the looted items

%SOURCE% will be replace with the source that dropped or gave the loot

Slayer:

%TASK% will be replaced with the task that you have completed. E.g. 50 monkeys

%TASKCOUNT% will be replaced with the number of tasks that you have completed.

%POINTS% will be replaced with the number of points you obtained from the task

Quests:

%QUEST% will be replaced with the name of the quest completed

Clue Scrolls:

%CLUE% will be replaced with the type of clue (beginner, easy, etc...)

%LOOT% will be replaced with the loot that was obtained from the casket

%TOTAL_VALUE% will be replaced with the total value of the items from the reward casket

%COUNT% will be replaced by the number of times that you have completed that tier of clue scrolls

Kill Count:

%BOSS% will be replaced with the boss name (be it the NPC, raid, etc.)

%COUNT% will be replaced with the kill count (or, generically: completion count)

Combat Achievements:

%TIER% will be replaced with the combat achievement tier (e.g., Easy, Hard, Grandmaster)

%TASK% will be replaced with the name of the combat task (e.g., Peach Conjurer)

%POINTS% will be replaced with the number of points you earned from the combat achievement.

%TOTAL_POINTS% will be replaced with the total points that have been earned across tasks.

If the task completion unlocked rewards for a tier, %COMPLETED% will be replaced with the tier that was completed.

Achievement Diary:

%AREA% will be replaced with the geographic area of the achievement diary tasks (e.g., Varrock)

%DIFFICULTY% will be replaced with the level of the achievement diary (e.g., Hard)

%TOTAL% will be replaced with the total number of achievement diaries completed across all locations and difficulties

%TASKS_COMPLETE% will be replaced with the number of tasks completed across all locations and difficulties

%TASKS_TOTAL% will be replaced with the total number of tasks possible across all locations and difficulties

%AREA_TASKS_COMPLETE% will be replaced with the number of tasks completed within the area

%AREA_TASKS_TOTAL% will be replaced with the total number of tasks possible within the area

Pet:

%GAME_MESSAGE% will be replaced with the game message associated with this type of pet drop

Speedrunning:

%QUEST% will be replaced with the name of the quest (e.g., Cook's Assistant)

%TIME% will be replaced with the time for the latest run

%BEST% will be replaced with the personal best time for this quest (note: only if the run was not a PB)

BA Gambles:

%COUNT% will be replaced with the high level gamble count

%LOOT% will be replaced with the loot received from the gamble (by default, this is included only in rare loot notifications)

Player Kills:

%TARGET% will be replaced with the victim's user name

Group Storage:

%DEPOSITED% will be replaced with the list of deposited items

%WITHDRAWN% will be replaced with the list of withdrawn items

Grand Exchange:

%TYPE% will be replaced with the transaction type (i.e., bought or sold)

%ITEM% will be replaced with the transacted item

%STATUS% will be replaced with the offer status (i.e., Completed, In Progress, or Cancelled)

Trades:

%COUNTERPARTY% will be replaced with the name of the other user involved in the trade

%GROSS_VALUE% will be replaced with the sum of item values offered by both parties in the transaction.

%NET_VALUE% will be replaced with the value of the received items minus the value of the given items.

Leagues:

Leagues notifications include: region unlocked, relic unlocked, and task completed (with customizable difficulty threshold).

Each of these events can be independently enabled or disabled in the notifier settings.

Chat:

The chat notifier enables notifications for messages that are otherwise not covered by our other notifiers.

You can customize the message patterns to your liking (* is a wildcard), and specify which types of messages to check (e.g., game, trade, clan notification, user chat).

%MESSAGE% will be replaced with the chat message the matched one of the patterns.

Metadata:

On login, Dink can submit a character summary containing data that spans multiple notifiers to a custom webhook handler (configurable in the Advanced section). This login notification is delayed by at least 5 seconds in order to gather all of the relevant data.

Credits

This plugin uses code from Universal Discord Notifier.

Item rarity data is sourced from the OSRS Wiki (licensed under CC BY-NC-SA 3.0), which was conveniently parsed by Flipping Utilities (and transformed by pajlads).

dinkplugin's People

Contributors

carlgroth avatar dependabot[bot] avatar doneyear avatar equirs avatar felanbird avatar iprodigy avatar midgetjake avatar mm2pl avatar notheowner avatar pajlada avatar redrails avatar tombolks avatar xel86 avatar

Stargazers

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

Watchers

 avatar  avatar  avatar  avatar  avatar

dinkplugin's Issues

Loot from Unsired does not notify

I received an Abyssal Dagger from using an Unsired but it did not post the loot. Loot threshold was set to 1M. If possible, when receiving an item with value from an Unsired it should notify the channel. Currently, bludgeon pieces have their individual worth posted in a clan chat when a player receives one.

Add the option for embedded notifications

I use this plugin because it's by far the most complete out of all and imo the least buggy.

But one thing I would like to get added is the option for embedded notifications. In my opinion they are better to read and look less cluttered than non embedded messages. I use this plugin for every notification in the game possible, instead for loot. For that I use an other plugin so it looks like this:

image

Is it possible for Dink to also have an option for embedded notifications? I know this is a personal preference and probably for a lot a people not a must-have, but I wanted to know what u thought about it.

Happy holidays!

Collapsed Dink settings by default

Currently opening Dink settings, you get greeted scrolled down all the way to the bottom and every notifier expanded, making it tedious to find something specific.
With the introduction of more notifiers maybe it could be better having Dink setting menus collapsed by default.

Always send uniques

First of all thanks very much for the embed commit, my notifications look so much cleaner now!

A feature I still would like to see added is an option under Loot; Always send uniques.

The way it works now is that the collection log notification will still pop but if you already have gotten it once it obviously won't.

Could this be a new toggle? Thank you it's very nice to see active development on this!

Setting to skip low tier clue notifications

Similar to the "Min Slayer Points" threshold, it might be useful to filter out low level clues.
Maybe something like "The minimum level Clue Casket tier to warrant a notification": ["Beginner", "Easy", "Medium", "Hard", "Elite", "Master"] where "Beginner" is the default (i.e. notify for all tier caskets)

There's a chance this setting is too extravagant, since minimum loot value threshold might be enough for people.

Not a request from me, but it came up briefly at @Supinic's stream, so I thought I'd get people's opinions here.

Image names should respect what notifier they came from

currently all images are called collectionImage

ideas:
petImage
levelImage // this one could have a better name
lootImage
deathImage
slayerImage
questImage
speedrunImage
killCountImage
combatTaskImage
achievementDiaryImage

Add `%TOTAL_VALUE%` as a variable for Clue Scrolls

In the HUGE refactor PRs from upstream, there is the addition of %TOTAL_VALUE% for both Clue Scrolls and Loot.
While loot might actually require some coding, Clue scrolls should be fairly easy to implement, as their information is apart of the chat messages.

Your treasure is worth around 273,894 coins!
image

Drop Rarity for Collection Log and Loot

It would be a nice touch to see the drop rarity for the Collection Log and Loot tabs. Maybe also for Pets and Clues?

Something like this I have in mind:

GLQHA4o

Now it only shows you the GE value.

Maybe also a toggle to set Min Drop Rarity to filter out some loot drops that wouldn't get passed if under the Min Loot Value threshold.

Thoughts?

Clue Scrolls: Master Clue scrolls might not post correctly

Dink version: 1.0.3
RuneLite version: 1.9.3

On both Universal and Dink, the master clue scroll reward i got didn't post on my Discord webhook. However after completing a beginner clue scroll, the reward of the master clue scroll reward got posted as a beginner clue.

Master Clue merged with Beginner clue

I also use other Discord webhook plugins like Rare Drop Notifier since i post to different webhook notifications to different text channels (clues for clue channel, levels for level channel, loot for loot channel etc.), I'm not sure if this is a webhook issue or a plugin issue. Since i also got this issue on Universal Discord, i think it could lie in the plugin itself.

Request: Ability to use a different webhook per category

Our Discord channel uses multiple webhooks for different notifications (Clues for Clue Scrolls, Collection Log for collection logs etc.) so we can post them to different text channels on Discord. Our group uses many RuneLite plugins to make this happen.

Since this plugin has a lot of categories we could use and this plugin is actively maintained, i think it would be nice to have the option configure a webhook per category so we can replace other plugins in RuneLite with Dink and maybe use other features of this plugin without resorting to one webhook which means 1 text channel in Discord for everything.

New notifier: Barbarian Assault high level gambles

Hi from Casual BA! I've noticed that this plugin supports a bunch of neat webhooks and was interested in the possibility of automatically sending players' high gamble counts to our Discord, since we have a channel for players to submit these manually. Gambles are a big deal in our community as we use it to determine ranks, maintain our own unofficial hiscores, and award discord badges for certain milestones. If this feature is deemed appropriate for this plugin, I'd be down to implement it.

Support for combat tasks completion

Seeing as collection log slots are already supported, it would be nice to include combat tasks completion as another category to support.

Possibly including a filter for whichever tier and/or type the user would like to trigger the notification with?

Add rsn whitelist option

Would appreciate a way to only trigger notifications on specific accounts, to avoid alts sending unwanted notifications.

Dink not posting notifications to Discord when RSN contains a space

Dink version: 1.2.1

Since version 1.2.1 our Discord channel doesn't get notifications anymore. So far it's with the loot and the achievements webhook.

The settings seems to be the same as in version 1.2.0. So i believe the webhook overrides stopped working.
The lost notifications were also not posted on the main webhook. So i believe the plugin still uses the webhook override but something did go wrong after that.

A different member of the Discord group I'm in also has this problem where his notifications weren't posted into Discord. So it's not a problem that's related to my RuneLite setup.

Only include screenshot on certain clue / drop value

Hi,

First of thanks for this plugin. It's by far the most complete by all others i've used.

Is it possible to show every clue / drop notification but only include a screenshot when the value is above x?

RuneLite_aIOXkBtCNq

Something like: Min Image Value

Mention boss name in Boss Slayer notifications

Currently Slayer notifications for bosses don't mention boss name since it's not included in the task complete message.
image
Looking at the game chat log, game sends a message regarding the name of the Boss and maybe location if on Konar task(unconfirmed), right before the task completion text.
image
Maybe support could be added for that.

Slayer notifier: Add option to prevent Turael point boosting

My thinking is an option to specify minimum number of points for the notification to trigger, that lets you set it to 1 to avoid all Turael tasks, 20 if you want to only show every 10th task from Duradel etc.

IMO the setting should be 0 by default, thereby not changing any previous behaviour.

Add Total Collection Logs to Collection Log Notification

Add an additional checkbox in the Collection Log menu for "Total Collection Logs". Having this check will also post the player's total collection log slots in the notification.

Example of Discord notification:
User has added a new item to their collection log: Trident of the seas (full) (701/1443)

Example of the message in-game:
image

Add extra data to Pet notificiations

Right now when you receive a pet and a notification is fired, the extra field is left empty. We should be able to fill this out with the pet name

Extra information for 'QUEST' type not provided

In the readme the 'extra' detail for quests is supplied as such:

  "content": "%USERNAME% has completed a quest: %QUEST%",
  "extra": {
    "questName": "Dragon Slayer I",
    "completedQuests": 22,
    "totalQuests": 156,
    "questPoints": 44,
    "totalQuestPoints": 293
  },
  "type": "QUEST"
}

However the extra fields such as 'completedQuests', 'questPoints' are not submitted:

0|KX  | 19/03 15:50: API Submission Type QUEST
0|KX  | 19/03 15:50: Player_Name Ommitted
0|KX  | 19/03 15:50: Account_Type HARDCORE_IRONMAN
0|KX  | 19/03 15:50: Extra { questName: "Gertrude's Cat" }

Setting to skip virtual levels

I would like a setting to disable notifications for virtual levels (i.e. I only want notifications for levels 1-99).
This should probably be a simple checkbox, where the default value should

Discussion points:
Should it be a positive checkbox? "Notify for virtual levels" where true would be default
Should it be a negative checkbox? "Skip virtual levels" where false would be default

Collection Log - Item picture in embed notification

Sorry if I'm opening to many issues but me and my friends love this plugin and we still think we have some good idea's to add to this plugin.

Would it be possible to put a picture of the item in the collection log embedded message?

If i remember correctly embedded messages can include up to 4 images.
Would be great if this could be toggled so that I could disable screenshots and include item pictures.

Thanks in advance!

Pet: No XP milestone when getting skilling pet

Dink version: 1.3.1

Just got my first skilling pet and yet the plugin didn't posted the milestone (at xxx XP). The milestone did get posted in the GIM chat.
No milestone skilling pet

GIM chat message
From the screenshot the plugin didn't waited for the GIM message.

[Code snippet was here about client log but that was from a different plugin]

Only Send Death Notification on PvP Death

It's awesome that we can send two different messages for PvM death and PvP death but would it be possible to have an option to only send a notification on PvP death only?

Import/Export Settings

An option to export/import settings would be extremely helpful. Especially, when using custom messages for notifications. Something similar to how the Radius Markers plugin works.

import-export-example

Pet: Add completions/XP from Clan chat to Dink notification

Dink version: 1.3.0

Since the pet notifications now show up with a name. I wonder if it's possible to add the completion / XP section from the GIM / Clan chat notification to the Dink notification?

What the notification now looks like:
Dink pet notification without KC

The GIM / Clan chat notification:
Notification Pet Youngleff

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.