discord-bot/CompatBot/Commands
2020-03-21 16:06:16 +05:00
..
Attributes allow any supporter to use !describe command 2020-03-08 22:53:54 +05:00
Converters update to c# 8.0 syntax, mostly for .Substring() 2019-11-06 03:45:31 +05:00
BaseCommandModuleCustom.cs prevent most commands in #media 2019-04-08 21:20:51 +05:00
BotMath.cs show math help when people are not very smart 2020-02-07 15:50:54 +05:00
BotStats.cs experimental stuff 2020-03-10 02:43:39 +05:00
CommandsManagement.cs Fix a few typos 2019-04-07 04:07:05 +05:30
CompatList.cs checked for missed and failed/cancelled builds to post in announcements 2020-03-01 00:09:43 +05:00
ContentFilters.cs add filter id on successful creation, similar to events 2020-03-09 22:53:24 +05:00
Cyberpunk2077.cs appease masses instead of fixing real shit 2019-06-16 13:02:24 +05:00
E3.cs improve event editor experience 2019-02-12 20:14:53 +05:00
Events.cs improve event editor experience 2019-02-12 20:14:53 +05:00
EventsBaseCommand.cs try to warn when creating a new event in the past 2020-02-20 19:22:34 +05:00
Explain.cs add support for FilterAction.ShowExplanation 2020-03-09 23:20:57 +05:00
ForcedNicknames.cs allow nicknames with spaces 2019-12-01 20:21:48 +05:00
Invites.cs try to fix invite list to prevent invite expansion 2020-02-16 01:20:06 +05:00
Ird.cs IRD lookup command 2018-11-05 01:51:08 +05:00
Misc.cs spice up your life 2020-02-02 19:41:23 +05:00
Moderation.Audit.cs use RecyclableMemoryStream to reduce GC pressure 2019-12-06 16:04:47 +05:00
Moderation.cs update logic to mark bad updates 2020-03-01 00:25:06 +05:00
Pr.cs fix linux pr build linking 2020-03-07 20:29:38 +05:00
Psn.Check.cs update to c# 8.0 syntax, mostly for .Substring() 2019-11-06 03:45:31 +05:00
Psn.cs change psn search results formatting 2020-03-10 18:38:08 +05:00
readme.md code documentation, part 2 2019-08-26 20:24:06 +05:00
Rpcs3Ama.cs improve event name matching, add temporary ama command 2019-08-28 19:12:00 +05:00
Sudo.Bot.Configuration.cs rebuild configuration on changes 2020-03-10 00:25:16 +05:00
Sudo.Bot.cs save custom restart message 2020-03-21 15:35:36 +05:00
Sudo.cs command to get a backup of thumbs.db 2020-03-21 16:06:16 +05:00
Sudo.Fix.cs update to c# 8.0 syntax, mostly for .Substring() 2019-11-06 03:45:31 +05:00
Sudo.Mod.cs you can mark command for deletion now with the new . command prefix 2019-02-25 02:05:29 +05:00
Syscall.cs add an option to rename system function call 2020-02-22 20:55:29 +05:00
Vision.cs react to a proper message 2020-03-10 03:14:26 +05:00
Warnings.cs update warning list logic a bit 2019-11-25 20:58:15 +05:00
Warnings.ListGroup.cs another broken query that I can't properly fix myself 2019-11-06 04:32:50 +05:00

Commands

The potatoes and gravy of the bot. All of them should be inherited from the BaseCommandModuleCustom class for uniform command management and permission model.

BotMath

This command is intended to parse and evaluate various math expressions. The implementation is based on mXparser.

BotStats

This command is intended to get general bot status information with some fun statistics thrown in.

CommandsManagement

This command group is intended to manage other command policies. The purpose of which is to be able disable and enable specific commands or groups of commands at runtime to prevent bot abuse and exploitation by regular users until the issue could be properly fixed.

CompatList

Command group dedicated for game compatibility API. Game listing is heavily relied on fuzzy string matching to sort by similarity score to the original request string.

One fun feature is to prevent bot abuse by one specific user, that's just a home grown meme.

ContentFilters aka Antipiracy

One of the more useful moderation command groups that allows content filtering in Discord text channels, as well as for screening uploaded user log files for support purposes.

For the most part it is straightforward, except for the filter editor logic in EditFilterPropertiesAsync(). It is structured as a simple state machine with labels denoting the nodes.

The gist of it is to have a wizard-like experience with multiple stages to edit the object model in a manner that would help moderators to correctly fill out all the necessary data. It's also a fun abuse of Discord embeds.

EventsBaseCommand, Events, E3, Cyberpunk2077

EventsBaseCommand implements simple calendar/scheduling system to track various events. It is mostly intended to show various gaming-related events and link the associated livestreams. It also implements the event object model editor in a similar fashion as ContentFilters.

Events command group then implements general event management commands, and E3 and Cyberpunk2077 are simple aliases for easier use.

Explain

One of the more useful command groups, mainly used for tech support. It is providing the means to define and show short explanation, a sort of FAQ or a wiki.

Each explanation has a term that defines the entry, and is how you can recall the explanation body. When searching for an explanation, if no direct match to term is found, some fuzzy text match logic is applied.

There's also an ability to attach a file to each explain. Media files are automatically recognized by the clients, and shown inline. This includes spoiler marks (which is implemented by simply prepending SPOILER_ to the filename).

Invites

This command group is dedicated to management of Discord invite whitelist. By default any invite link will be removed, but moderators can add target servers to the whitelist to allow invite sharing by regular users.

Ird

Simple command to look up available items from the IRD Library.

Misc

A fun pile of random commands, including:

  • !about to show people contributed to the bot in some way
  • !roll to generate random number from 1 to specified value, or to cast a bunch of dice
  • !8ball to randomly pick one of the predefined answers for a yes/no question
  • !rate to randomly pick one of the predefined quality answers, using data-driven seed to produce consistent reply for the same question
  • !download is a meme/bait command that is aliased to !psn search

Moderation

Command group for various moderation-related commands, including:

  • !report to link any message to the moderation queue
  • !analyze to force log analysis in case it is needed again
  • !badupdate to mark update announcement as not good for general consumption

Audit commands are used to check various suspicious stuff like users trying to impersonate staff, or users abusing Unicode combining characters to produce zalgo.

Pr

This command is used to query GitHub for any open pull request that meets the specified text filter. First word in the query is additionally treated as a PR author. In case only one items is returned, it is show as an embed with the link to the latest available artifact download from AppVeyor.

Psn

Various (PSN-related)[Clients/PsnClient] commands. Most commonly used is the !psn check updates that is using PSN game update API to show links for the game updates.

Same kind of anti-abuse measures is implemented here, as for the CompatList.

Sudo

Commands for the bot management and abuse by mods. say and react will make the bot to post a specified message or reaction, log will attach current log file for easier access.

mod subgroup is for managing bot roles, which are currently separated from Discord roles.

fix subgroup is a technical group to help fix various data in bot state.

bot subgroup is for managing the bot instance itself: stop, restart, update are self-explanatory; status can set Discord status that will show up on bot profile.

Syscall

Command to query information about what games used what functions from the PS3 kernel and firmware modules.

Warnings

Warning system management commands. You can look at various warning lists, as well ass issue and retract warnings for specific users.