A bot for discord.
All of the Fiddles.
Less of the snark.
Click here to add it.
The previous iteration of fidbot was last updated 7 years ago. A testament to the robust work from the discordjs maintainers at that time that it worked this well this long perhaps?
Nevertheless, there have been moments throughout those years that the bot died for reasons I never managed to pin down. This was largely ignorable until recently (EOY 2023) when there was a rash of fidbot failures.
I chose to spend the time rewriting fidbot to use the latest iteration of discordjs, which has changed substantially since before to keep pace with the changes Discord itself has made to how bots work with it. Most notably are the "slash commands" and rich interactions with buttons and modals and the like.
It is my hope that being on an up to date framework will result in greater stability for fidbot, whilst also generally refining the experience.
- Remove the original fidbot
- Add the new fidbot2 using the link above
- Run
/settings
(must have admin or manage server perms) to view and configure the new features - (Optional) Manually drag the "Fidbot 2.0" role that should be created when inviting the bot as high as it will go on the role list. Some features will not work otherwise
This brings up a collection of buttons named after commands or features. Clicking the button toggles the corresponding feature being enabled. For commands, being disabled does not remove them from the command list due to technical limitations. Instead, any user that executes a disabled command receives a bot response that only they can see rather than being viewable by other users.
In order to fully hide commands from the command list, a server admin or manager can configure override behaviour in the server integration settings. This allows the command to be disabled based for roles, channels or specific users, whereupon affected users will have it disappear from their command list.
These are features that are triggered by entering a command, initiated by typing /
into the message box.
Allows server admins to configure Fidbot to automatically reply to messages.
When a new message is read by Fidbot it will check whether there are any rules in place that match it. A rule can be restricted to only apply to a specific user. There is the ability to further filter by matching the message against a regex pattern.
The response itself is largely static, but can contain the following templated values:
<user>
will be replaced by a discord mention of the user who posted the message this is in reply to
The regex patterns use the following syntax but with some restrictions, mainly the inability to use the forward and back referencing. This is to avoid you cretins submitting a hilarious combination of regex and input that locks the bot up computing the result for all eternity in what's known as a ReDoS attack. Actually the exact syntax is described here but this is probably harder to understand and mostly the same as the other link.
It is worth noting that when there are multiple matching rules, only three will be executed. It prioritises user specific rules over generic rules, and within each category it prioritises by how recently created the rule is.
Creates a new autoreply rule.
The response
parameter is the text that Fidbot will respond with when executing a reply.
The optional user
parameter allows the rule to be constrained to only being applied to messages made by that user.
Omitting it will have Fidbot check the rule against every message.
The optional match
parameter allows the rule to be constrained by the message content.
This is used as a regex pattern, allowing for a wide range of matching options.
At its simplest, you can treat it as a simple substring check - using ping
as the value for this parameter will make Fidbot respond to any message that contains that text, such as "I like to play pingpong".
Conversely, using basic regex such as using [0-9]
for this parameter will make it respond to any message that contains a numerical digit.
Fidbot displays a list of autoreply rules that only the user of the command can see. This provides the ID for each rule, which is required when wanting to delete a rule.
The optional parameters will filter down the listed output to make it easier to manage lots of rules.
Displayed match entries will show as /<match>/ui
where <match>
is the parameter that was entered during creation.
This is to reflect the ui
regex flags that it executes with, which specifically mean that it runs in unicode mode and case-insensitive mode.
This removes a rule. The ID can be obtained by finding the rule in the list output.
A collection of tools for interacting with Akun, a quest website.
Executes input
as an Akun dice command and returns the result.
Queries Akun for the currently live quests and displays a set of links to them.
If the results outnumber the maximum number of links Discord supports then pagination controls are added. These controls can be interacted with by all users that can see the output, potentially leading to users deliberately interfering with one another. The "Finish" button allows a user to freeze the output on the current page.
The optional page
parameter allows the user to specify the initial page to display, which can be used to circumvent other users calling "Finish" before the initiator navigates to the desired page.
Queries Akun for the given quest title
, returning an overview of it if found.
Resolving quest titles relies on a local cache which cannot guarantee completeness (due to some quests being unpublished, and thus undiscoverable, and other quests having their title edited to a value that Fidbot hasn't cached).
A user can force guaranteed retrieval by submitting a quest ID for the title
parameter.
Fidbot will accuse subject
of being a descriptor
.
Fidbot will randomly pick a choice for the user.
The choices
parameter must be formatted as a series of ;
separated outcomes.
As a janitor of a server, do you ever get into a tussle with a user over that user's nickname? You have this brilliant nickname for them, yet they keep insisting on changing it to something else?
Ever wished you could automate the scuffle for your own convenience?
That's what this command is for, with a random delay (3 seconds to 5 minutes) introduced to allow the target user to believe they are engaging in a fair fight with a human.
Fidbot displays a list only the user of the command can see of the current users with locked nicknames. The list items are buttons, and clicking them will free that user from nickname jail.
This command does not change their nickname, it simply stops Fidbot from automatically changing it in the future.
The optional user
parameter can be used to free a known locked user directly without going through the button menu.
Locks the given user
with their current nickname.
If the locked-name
parameter is provided then this becomes their locked name, rather than their existing nickname, and their nickname is also immediately updated to locked-name
.
Roll complex RPG dice by executing the input
parameter.
Instructions on syntax can be found here.
This allows server admins to configure which users the twitter embed feature will be applied to. Users on the blacklist will never have Fidbot embed their tweets. If a whitelist has more than zero users then it becomes active, and only users on the whitelist will have Fidbot embed their tweets (unless those users are also on the blacklist).
If the optional <user>
parameter is provided then that user will be added to the blacklist if not already on it, or removed from the blacklist if they are.
Fidbot will confirm which action was taken in response text.
If the parameter is omitted instead, then a list of users on the blacklist will be displayed as buttons. Clicking the button will remove the user from the list.
If the optional <user>
parameter is provided then that user will be added to the whitelist if not already on it, or removed from the whitelist if they are.
Fidbot will confirm which action was taken in response text.
If the parameter is omitted instead, then a list of users on the whitelist will be displayed as buttons. Clicking the button will remove the user from the list.
Makes Fidbot say the given text
but wider.
Fidbot will consult a Magic 8 Ball for the answer to your given question
.
These are passive features that are not triggered by a command.
Users will be briefly reminded that posts with the sequence of letters awoo
found in them are illegal and carry a fine of $350.
At this point in time, for some reason, Discord cannot embed posts hosted by https://twitter.com or https://x.com. Third parties have built workarounds for this issue, by feeding those posts through their proxy which provides a proper link preview embed to Discord instead. The one caveat: it requires users to use them.
Fidbot's twitter embed feature will automatically detect un-proxied URLs and post alongside them with the proxied version, thus triggering the embed.
For this to work, the Fidbot BOT user in discord must be present in the channel. Channels that are private will need to explicitly add Fidbot (like one would any other user) for this feature to work in them.
Feel free to holler at me on Discord, GitHub, or my gmail. I get enough spam as it is, so handles and addresses are left as an exercise for the reader.