No description
Find a file
2026-01-28 11:50:59 -06:00
src Added version command and improved some Help messages 2026-01-28 11:50:59 -06:00
.gitignore Modularized MOTD system 2026-01-24 15:55:43 -06:00
CHANGELOG.md Added version command and improved some Help messages 2026-01-28 11:50:59 -06:00
hxbuild.hxml Classpath reorganization 2026-01-15 18:48:22 -06:00
README.md Added version command and improved some Help messages 2026-01-28 11:50:59 -06:00

onequestionmark-chat

onequestionmark is a Discord bot written in Haxe.

Name origin

Following the established naming scheme of Maralis and Derxwna's fivequestionmarks and Kuschelyagi's tenquestionmarks, onequestionmark is named after the glitch Pokémon known only as "?" (which amusingly has two question marks as its sprite).

"onequestionmark" is never capitalized.

Configuration

A settings.json file is required to run the bot. An example is provided below:

{
	"motd": {
		"date": "",
		"time": 8,
		"channels": [],
		"previous": [0,0,0,0,0,0,0]
	},
	"icelist": [],
	"debug": false,
	"devmode": false,
	"devchannel": "000000000000000000",
	"botowner": "000000000000000000",
	"devserver": "000000000000000000",
	"token": "fhqwhgadshgnsdhjsdbkhsdabkfabkveybvf"
}
  • onequestionmark will handle most of the motd values itself.
    • date and previous are modified by the bot during normal operations.
    • time determines the hour at which the MOTD is posted (24-hour notation, local time).
    • Using the ?motd command adds the current channel to the channels array.
  • icelist is a channel blacklist for the Ice Autoresponder. ?ice.toggle will add/remove the current channel ID from this array.
  • debug determines whether HxDiscord's console debug messages are enabled.
  • devmode restricts the bot's responses to the specified dev server.
  • devchannel, devserver, and botowner must be filled with the appropriate numerical values. These values can be seen easily in Discord's URLs.
  • token is your Discord bot app token. Don't share it.

The Settings file is the only one that must be provided. onequestionmark will generate default custom-cmds.json, echobox-db.json, and motd-db.json files in the data/ directory at startup if it fails to find any of them.

As settings.json contains sensitive information and the data/ folder contains files specific to the running bot instance, they are excluded from this repo. Data files for the official onequestionmark-chat instance can be found here.

Building from source

Requirements

Install the libraries from their git repositories (except HtmlParser because its repo isn't set up for that).

Compiling

Navigate to the project folder in a terminal and run haxe hxbuild.hxml -D version=x.y, replacing x.y with the appropriate version info. This will generate onequestionmark.n in the export folder.

As of v1.3-indev5, onequestionmark will refuse to start if version is not defined at build time. See Conditional Compilation in the Haxe manual for more details.

The provided hxbuild.hxml file is set up to immediately run the bot after compiling.

Running

neko onequestionmark.n

onequestionmark is designed and tested to run in NekoVM (included with Haxe). Other Haxe targets not guaranteed to work (see HxDiscord library's compatibility).

onequestionmark.n should be placed in the same directory as its settings.json file.

It is preferable to stop the bot via its own ?quit command in Discord, so it can save its files before exiting.