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.026 Dec 2016
1.1.08 Jan 2017
1.2.017 Jan 2017
1.3.028 Jan 2017
1.4.026 Feb 2017
1.5.07 Mar 2017
1.6.021 Mar 2017
1.7.025 Mar 2017
1.8.023 Apr 2017
1.9.03 May 2017
1.9.123 May 2017
1.0.0-selfbot29 Sep 2017
2.0.08 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

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 PermissionsManage Guild
Bot PermissionsManage Guild
Lifetime5 Minutes
Paginated

.audits <count = 10>

Lists audit logs of the server.

User PermissionsView Audit Log
Bot PermissionsView Audit Log
Lifetime5 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 PermissionsManage Guild
Bot PermissionsManage Webhooks
Lifetime20 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 PermissionsManage Guild
Bot PermissionsManage Webhooks
Lifetime20 Seconds
Interactive

.pin.set.reactions <minimum_reactions>

Configures pin board setting for number of minimum reactions required for pinning messages.

User PermissionsManage Guild
Lifetime20 Seconds

.pin.set.emoji <emoji>

Configures pin board setting for the emoji to use for pinning messages.

User PermissionsManage Guild
Lifetime20 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 PermissionsManage Guild
Lifetime20 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 Limit6 Times in 1 Minute

Fun

.ris <text...>

Converts given text to regional indicator symbols.

Rate Limit6 Times in 1 Minute

Info

.info

Prints information about the bot.

Rate Limit3 Times in 1 Minute
Lifetime5 Minutes

.stats

Prints bot statistics.

Rate Limit3 Times in 1 Minute
Lifetime5 Minutes

.modules

Prints a list of all modules with a link to this documentation.

Rate Limit3 Times in 1 Minute
Lifetime5 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.

Lifetime5 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 Limit6 Times in 1 Minute
Lifetime5 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 Limit6 Times in 1 Minute
Lifetime5 Minutes

.portal2.leaderboard <map_name... = optional>

Lists the rankings of a given map.

Rate Limit3 Times in 1 Minute
Lifetime5 Minutes
Paginated

.portal2.changelog <map_name...>

Lists the changelog of a given map.

Rate Limit3 Times in 1 Minute
Lifetime5 Minutes
Paginated

.portal2.profile <user_name_or_steam_id_64... = optional>

Prints the profile of a given user.

Rate Limit3 Times in 1 Minute
Lifetime5 Minutes
Paginated

.portal2.aggregated <user_name_or_steam_id_64... = optional>

Prints the profile of a given user.

Rate Limit3 Times in 1 Minute
Lifetime5 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 Limit3 Times in 1 Minute
Lifetime5 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 PermissionsManage Webhooks
Bot PermissionsManage Webhooks

services.speedruncom.unsubscribe

Unsubscribes to the speedrun.com service.

User PermissionsManage Webhooks
Bot PermissionsManage Webhooks

services.auditor.subscribe

Subscribes to the auditor service.

User PermissionsManage Webhooks
Bot PermissionsManage Webhooks

services.auditor.unsubscribe

Unsubscribes to the auditor service.

User PermissionsManage Webhooks
Bot PermissionsManage Webhooks

Source

.cvars.?

Prints information about the SourceEngine console command module.

Lifetime5 Minutes

.cvars.halflife2 <cvar>

Looks up a given console command for Half-Life 2.

Lifetime5 Minutes

.cvars.portal <cvar>

Looks up a given console command for Portal.

Lifetime5 Minutes

.cvars.portal2 <cvar>

Looks up a given console command for Portal 2.

Lifetime5 Minutes

.cvars.sourceautorecord <cvar>

Looks up a given console command for SourceAutoRecord.

Lifetime5 Minutes

.demo

.demo.?

Prints information about the SourceEngine demo module.

Lifetime5 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 Limit3 Times in 1 Minute
Lifetime5 Minutes
Interactive

.demo.get

Prints demo information.

Rate Limit3 Times in 1 Minute
Lifetime5 Minutes

.demo.filestamp

Prints demo information.

Lifetime5 Minutes

.demo.protocol

Prints demo information.

Lifetime5 Minutes

.demo.servername

Prints demo information.

Lifetime5 Minutes

.demo.clientname

Prints demo information.

Lifetime5 Minutes

.demo.mapname

Prints demo information.

Lifetime5 Minutes

.demo.gamedirectory

Prints demo information.

Lifetime5 Minutes

.demo.playbacktime

Prints demo information.

Lifetime5 Minutes

.demo.playbackticks

Prints demo information.

Lifetime5 Minutes

.demo.playbackframes

Prints demo information.

Lifetime5 Minutes

.demo.signonlength

Prints demo information.

Lifetime5 Minutes

.demo.messages

Prints demo information.

Rate Limit6 Times in 1 Minute
Lifetime5 Minutes

.demo.messages <index>

Prints demo information.

Rate Limit6 Times in 1 Minute
Lifetime5 Minutes

.demo.gettickrate

Prints demo information.

Lifetime5 Minutes

.demo.gettickspersecond

Prints demo information.

Lifetime5 Minutes

.demo.adjustexact

Prints demo information.

Rate Limit1 Time in 1 Minute
Lifetime5 Minutes

.demo.adjustflag

Prints demo information.

Rate Limit1 Time in 1 Minute
Lifetime5 Minutes

.demo.adjust

Prints demo information.

Rate Limit1 Time in 1 Minute
Lifetime5 Minutes

Stats

.guild

Prints statistics about the current server.

Rate Limit6 Times in 1 Minute
Lifetime5 Minutes

.hierarchy

Prints the role hierarchy of the current server.

Rate Limit6 Times in 1 Minute
Lifetime5 Minutes

.channel

Prints information about the current channel.

Rate Limit6 Times in 1 Minute
Lifetime5 Minutes

.id <ascending = true>

Lists top user IDs of the current server.

Rate Limit6 Times in 1 Minute
Lifetime5 Minutes
Paginated

.disc <ascending = true>

Lists top user discriminators of the current server.

Rate Limit6 Times in 1 Minute
Lifetime5 Minutes
Paginated

.joined <ascending = true>

Lists top user joined dates of the current server.

Rate Limit6 Times in 1 Minute
Lifetime5 Minutes
Paginated

.created <ascending = true>

Lists top user created dates of the current server.

Rate Limit6 Times in 1 Minute
Lifetime5 Minutes
Paginated

.pin.champions <descending = true>

Lists top pin champions from the pin board of the current server.

Rate Limit3 Times in 1 Minute
Lifetime5 Minutes
Paginated

.pin.pinners <descending = true>

Lists top pin pinners from the pin board of the current server.

Rate Limit3 Times in 1 Minute
Lifetime5 Minutes
Paginated