discord-bot/CompatBot/Commands
2019-11-07 21:48:30 +05:00
..
Attributes code documentation, part 2 2019-08-26 20:24:06 +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 relax the number of results for psn search 2019-06-03 13:52:28 +05:00
BotStats.cs add more stats 2019-11-06 03:05:53 +05:00
CommandsManagement.cs Fix a few typos 2019-04-07 04:07:05 +05:30
CompatList.cs fix error check in update info checker 2019-10-24 20:02:24 +05:00
ContentFilters.cs fix filter editor to support the new action 2019-11-06 05:30:20 +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 update to c# 8.0 syntax, mostly for .Substring() 2019-11-06 03:45:31 +05:00
Explain.cs update to c# 8.0 syntax, mostly for .Substring() 2019-11-06 03:45:31 +05:00
Invites.cs implement string trimming based on visible characters length 2019-02-06 22:02:33 +05:00
Ird.cs IRD lookup command 2018-11-05 01:51:08 +05:00
Misc.cs update to c# 8.0 syntax, mostly for .Substring() 2019-11-06 03:45:31 +05:00
Moderation.Audit.cs missed a new line 2019-03-14 04:12:26 +05:00
Moderation.cs ability to mark update announcement as a bad update 2019-08-22 19:47:28 +05:00
Pr.cs make compiler happy again 2019-08-19 16:53:30 +05:00
Psn.Check.cs update to c# 8.0 syntax, mostly for .Substring() 2019-11-06 03:45:31 +05:00
Psn.cs update to c# 8.0 syntax, mostly for .Substring() 2019-11-06 03:45:31 +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.cs pass restart info through database to workaround docker lifecycle management 2019-11-07 21:48:30 +05:00
Sudo.cs update to c# 8.0 syntax, mostly for .Substring() 2019-11-06 03:45:31 +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 [wip] everything is fucked 2019-11-01 00:05:54 +05:00
Warnings.cs restore balance 2019-10-02 23:09:11 +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.