discord-bot/CompatBot/Commands
2021-07-17 17:45:25 +05:00
..
Attributes replace .Respond() with .Channel.SendMessage() 2021-05-01 01:54:04 +05:00
Converters support message links in some !sudo commands 2021-04-14 00:44:22 +05:00
BaseCommandModuleCustom.cs replace .Respond() with .Channel.SendMessage() 2021-05-01 01:54:04 +05:00
BotMath.cs replace .Respond() with .Channel.SendMessage() 2021-05-01 01:54:04 +05:00
BotStats.cs GroupCommands ignoring Check attributes strikes again 2021-05-01 01:42:25 +05:00
CommandsManagement.cs replace .Respond() with .Channel.SendMessage() 2021-05-01 01:54:04 +05:00
CompatList.cs in spam channels add button to replace regular product code result with updates 2021-06-05 17:39:10 +05:00
ContentFilters.cs I am very dumb and discord is even dumber. But 5 actions per row is how it is 2021-07-15 02:48:02 +05:00
DevOnly.cs update 3rd party deps 2021-07-05 21:34:51 +05:00
E3.cs improve event editor experience 2019-02-12 20:14:53 +05:00
Events.cs use await using where appropriate 2020-11-14 15:25:20 +05:00
EventsBaseCommand.cs update 3rd party deps 2021-07-05 21:34:51 +05:00
Explain.cs replace .Respond() with .Channel.SendMessage() 2021-05-01 01:54:04 +05:00
ForcedNicknames.cs try to use username when it's better than the nickname 2021-05-01 23:58:39 +05:00
Fortune.cs add replies back where it makes sense 2021-05-07 14:16:19 +05:00
Invites.cs replace .Respond() with .Channel.SendMessage() 2021-05-01 01:54:04 +05:00
Ird.cs replace .Respond() with .Channel.SendMessage() 2021-05-01 01:54:04 +05:00
Minesweeper.cs replace .Respond() with .Channel.SendMessage() 2021-05-01 01:54:04 +05:00
Misc.cs in spam channels add button to replace regular product code result with updates 2021-06-05 17:39:10 +05:00
Moderation.Audit.cs try to use username when it's better than the nickname 2021-05-01 23:58:39 +05:00
Moderation.cs support !analyze with reply link 2021-04-13 16:01:19 +05:00
Pr.cs replace .Respond() with .Channel.SendMessage() 2021-05-01 01:54:04 +05:00
Psn.Check.cs add yet another hack to workaround new client library breakage 2021-06-15 20:37:49 +05:00
Psn.cs use await using where appropriate 2020-11-14 15:25:20 +05:00
readme.md fix links in the compatbot/commands readme 2020-12-08 06:45:56 +01:00
Sudo.Bot.Configuration.cs add another alias 2021-06-15 12:20:05 +05:00
Sudo.Bot.cs apply new code style 2021-05-07 13:32:48 +05:00
Sudo.cs switch to lzma and optimiza db before taking the backup 2021-05-12 21:14:51 +05:00
Sudo.Dotnet.cs replace .Respond() with .Channel.SendMessage() 2021-05-01 01:54:04 +05:00
Sudo.Fix.cs replace .Respond() with .Channel.SendMessage() 2021-05-01 01:54:04 +05:00
Sudo.Mod.cs fix resharper warnings 2020-11-14 15:58:16 +05:00
Syscall.cs replace .Respond() with .Channel.SendMessage() 2021-05-01 01:54:04 +05:00
Vision.cs log adult scores 2021-07-17 17:45:25 +05:00
Warnings.cs do not overwrite warning retraction info on clear 2021-07-09 18:49:39 +05:00
Warnings.ListGroup.cs handle very old warns 2021-05-21 15:01:51 +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 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.