NeKzBot
Current Version: 2.0.0 | Last Update: May 2021
Introduction
NeKzBot is a chat bot for Discord which finds its application in our Portal 2 speedrunning community server.
Features
- Notification System
- Auditor
- speedrun.com
- SourceEngine Demo Parser
- Portal 2 Challenge Mode Stats
- SourceEngine Command Lookup
- Code Execution Engine
Versions
1.0.0 | 26 Dec 2016 |
1.1.0 | 8 Jan 2017 |
1.2.0 | 17 Jan 2017 |
1.3.0 | 28 Jan 2017 |
1.4.0 | 26 Feb 2017 |
1.5.0 | 7 Mar 2017 |
1.6.0 | 21 Mar 2017 |
1.7.0 | 25 Mar 2017 |
1.8.0 | 23 Apr 2017 |
1.9.0 | 3 May 2017 |
1.9.1 | 23 May 2017 |
1.0.0-selfbot | 29 Sep 2017 |
2.0.0 | 8 Oct 2017 - now |
Credits
- Baister - for trusting my coding skills and the changes that I brought to the server
- Portal 2 Speedrunning community - for making the bot more robust by breaking and exploiting certain features
- Discord.Net Developers - for introducing me into the world of API libraries and .NET
- Discord - for making the world's best documented API
Dependencies
- Discord.Addons.Interactive
- Discord.Addons.Preconditions
- LiteDB
- Newtonsoft.Json
- Portal2Boards.Net
- SourceDemoParser.Net
Installation
Requires .NET 5.0 or higher.
git clone --recurse-submodules https://github.com/NeKzor/NeKzBot
cd NeKzBot
./install
- Configure
private/credentials.json
- Discord app bot token
- speedrun.com API token
./build
./run
Modules
Non-public modules are marked as *
which require to be admin or owner
- Commands are denoted as
.command
or.command.subcommand
- Command arguments are denoted as
<argument>
- Text arguments are denoted as
<argument...>
- Optional arguments are denoted as
<argument = 10>
or<argument = optional>
- Optional text arguments are denoted as
<argument... = optional>
Admin
Note: Requires to have special permissions.
.invites
Lists all invites of the server.
User Permissions | Manage Guild |
Bot Permissions | Manage Guild |
Lifetime | 5 Minutes |
Paginated |
.audits <count = 10>
Lists audit logs of the server.
User Permissions | View Audit Log |
Bot Permissions | View Audit Log |
Lifetime | 5 Minutes |
Paginated |
.pin <message_id>
Manually pins a given message. Will ask to create a new pin board for the server if it does not exist.
User Permissions | Manage Guild |
Bot Permissions | Manage Webhooks |
Lifetime | 20 Seconds |
Interactive |
.pin.set
Configures pin board settings. Asks for the number of pins required, the emoji to use for pinning messages and then the amount of days until a message should be ignored for pinning.
User Permissions | Manage Guild |
Bot Permissions | Manage Webhooks |
Lifetime | 20 Seconds |
Interactive |
.pin.set.reactions <minimum_reactions>
Configures pin board setting for number of minimum reactions required for pinning messages.
User Permissions | Manage Guild |
Lifetime | 20 Seconds |
.pin.set.emoji <emoji>
Configures pin board setting for the emoji to use for pinning messages.
User Permissions | Manage Guild |
Lifetime | 20 Seconds |
.pin.set.days <days_until_message_expires>
Configures pin board setting for the amount of days until a message should be ignored for pinning.
User Permissions | Manage Guild |
Lifetime | 20 Seconds |
Code
.code.?
Prints information about this module.
.code.run <language> <code...>
Executes code of a give programming language. New code can be run again by editing the previous message.
Example:
.code.run bash
```bash
cat /etc/passwd
```
Rate Limit | 6 Times in 1 Minute |
Fun
.ris <text...>
Converts given text to regional indicator symbols.
Rate Limit | 6 Times in 1 Minute |
Info
.info
Prints information about the bot.
Rate Limit | 3 Times in 1 Minute |
Lifetime | 5 Minutes |
.stats
Prints bot statistics.
Rate Limit | 3 Times in 1 Minute |
Lifetime | 5 Minutes |
.modules
Prints a list of all modules with a link to this documentation.
Rate Limit | 3 Times in 1 Minute |
Lifetime | 5 Minutes |
Owner
Note: Requires to be bot owner.
.tasks
Used when automated tasks have to be controlled manually.
.tasks.status
Replies with current status of all tasks.
.tasks.stop <task_name>
Stops a given task.
.tasks.start <task_name>
Starts a given task.
.tasks.restart <task_name>
Restarts a given task.
.piston.update
Updates the list of supported programming languages.
Portal 2
.portal2.?
Prints information about this module.
Lifetime | 5 Minutes |
.portal2.map <map_name... = optional>
Posts an overview image of a give map. A random map will be chosen if no name is provided.
Rate Limit | 6 Times in 1 Minute |
Lifetime | 5 Minutes |
.portal2.discovery <discovery_name... = optional>
Posts showcase link of a give discovery. A random discovery will be chosen if no name is provided.
Rate Limit | 6 Times in 1 Minute |
Lifetime | 5 Minutes |
.portal2.leaderboard <map_name... = optional>
Lists the rankings of a given map.
Rate Limit | 3 Times in 1 Minute |
Lifetime | 5 Minutes |
Paginated |
.portal2.changelog <map_name...>
Lists the changelog of a given map.
Rate Limit | 3 Times in 1 Minute |
Lifetime | 5 Minutes |
Paginated |
.portal2.profile <user_name_or_steam_id_64... = optional>
Prints the profile of a given user.
Rate Limit | 3 Times in 1 Minute |
Lifetime | 5 Minutes |
Paginated |
.portal2.aggregated <user_name_or_steam_id_64... = optional>
Prints the profile of a given user.
Rate Limit | 3 Times in 1 Minute |
Lifetime | 5 Minutes |
Paginated |
.portal2.compare <user_name_or_steam_id_64> <user_name_or_steam_id_64_2 = optional>
Compares two user profiles. Username or nickname of command executor will be taken as second profile to compare to if the second argument is not provided.
Rate Limit | 3 Times in 1 Minute |
Lifetime | 5 Minutes |
Paginated |
Service
Note: Requires to have special permission.
services.?
Prints help and information of all available webhook services.
services.speedruncom.subscribe
Subscribes to the speedrun.com service.
User Permissions | Manage Webhooks |
Bot Permissions | Manage Webhooks |
services.speedruncom.unsubscribe
Unsubscribes to the speedrun.com service.
User Permissions | Manage Webhooks |
Bot Permissions | Manage Webhooks |
services.auditor.subscribe
Subscribes to the auditor service.
User Permissions | Manage Webhooks |
Bot Permissions | Manage Webhooks |
services.auditor.unsubscribe
Unsubscribes to the auditor service.
User Permissions | Manage Webhooks |
Bot Permissions | Manage Webhooks |
Source
.cvars.?
Prints information about the SourceEngine console command module.
Lifetime | 5 Minutes |
.cvars.halflife2 <cvar>
Looks up a given console command for Half-Life 2.
Lifetime | 5 Minutes |
.cvars.portal <cvar>
Looks up a given console command for Portal.
Lifetime | 5 Minutes |
.cvars.portal2 <cvar>
Looks up a given console command for Portal 2.
Lifetime | 5 Minutes |
.cvars.sourceautorecord <cvar>
Looks up a given console command for SourceAutoRecord.
Lifetime | 5 Minutes |
.demo
.demo.?
Prints information about the SourceEngine demo module.
Lifetime | 5 Minutes |
.demo.parse
Parses an attached SourceEngine demo file. Asks to look for a demo file in the last 100 messages if no file was attached.
Rate Limit | 3 Times in 1 Minute |
Lifetime | 5 Minutes |
Interactive |
.demo.get
Prints demo information.
Rate Limit | 3 Times in 1 Minute |
Lifetime | 5 Minutes |
.demo.filestamp
Prints demo information.
Lifetime | 5 Minutes |
.demo.protocol
Prints demo information.
Lifetime | 5 Minutes |
.demo.servername
Prints demo information.
Lifetime | 5 Minutes |
.demo.clientname
Prints demo information.
Lifetime | 5 Minutes |
.demo.mapname
Prints demo information.
Lifetime | 5 Minutes |
.demo.gamedirectory
Prints demo information.
Lifetime | 5 Minutes |
.demo.playbacktime
Prints demo information.
Lifetime | 5 Minutes |
.demo.playbackticks
Prints demo information.
Lifetime | 5 Minutes |
.demo.playbackframes
Prints demo information.
Lifetime | 5 Minutes |
.demo.signonlength
Prints demo information.
Lifetime | 5 Minutes |
.demo.messages
Prints demo information.
Rate Limit | 6 Times in 1 Minute |
Lifetime | 5 Minutes |
.demo.messages <index>
Prints demo information.
Rate Limit | 6 Times in 1 Minute |
Lifetime | 5 Minutes |
.demo.gettickrate
Prints demo information.
Lifetime | 5 Minutes |
.demo.gettickspersecond
Prints demo information.
Lifetime | 5 Minutes |
.demo.adjustexact
Prints demo information.
Rate Limit | 1 Time in 1 Minute |
Lifetime | 5 Minutes |
.demo.adjustflag
Prints demo information.
Rate Limit | 1 Time in 1 Minute |
Lifetime | 5 Minutes |
.demo.adjust
Prints demo information.
Rate Limit | 1 Time in 1 Minute |
Lifetime | 5 Minutes |
Stats
.guild
Prints statistics about the current server.
Rate Limit | 6 Times in 1 Minute |
Lifetime | 5 Minutes |
.hierarchy
Prints the role hierarchy of the current server.
Rate Limit | 6 Times in 1 Minute |
Lifetime | 5 Minutes |
.channel
Prints information about the current channel.
Rate Limit | 6 Times in 1 Minute |
Lifetime | 5 Minutes |
.id <ascending = true>
Lists top user IDs of the current server.
Rate Limit | 6 Times in 1 Minute |
Lifetime | 5 Minutes |
Paginated |
.disc <ascending = true>
Lists top user discriminators of the current server.
Rate Limit | 6 Times in 1 Minute |
Lifetime | 5 Minutes |
Paginated |
.joined <ascending = true>
Lists top user joined dates of the current server.
Rate Limit | 6 Times in 1 Minute |
Lifetime | 5 Minutes |
Paginated |
.created <ascending = true>
Lists top user created dates of the current server.
Rate Limit | 6 Times in 1 Minute |
Lifetime | 5 Minutes |
Paginated |
.pin.champions <descending = true>
Lists top pin champions from the pin board of the current server.
Rate Limit | 3 Times in 1 Minute |
Lifetime | 5 Minutes |
Paginated |
.pin.pinners <descending = true>
Lists top pin pinners from the pin board of the current server.
Rate Limit | 3 Times in 1 Minute |
Lifetime | 5 Minutes |
Paginated |