Kanji Quiz Bot for Discord written in Go
Find a file
2025-05-24 17:11:12 +02:00
quizzes Fix quiz errors 2025-05-24 16:48:16 +02:00
resources Add dictionary entries 2025-05-24 16:07:56 +02:00
.gitignore Initialise project 2019-09-05 16:46:13 +02:00
fontdraw.go Initialise project 2019-09-05 16:46:13 +02:00
go.mod Even more dependency updates 2025-05-24 17:11:12 +02:00
go.sum Even more dependency updates 2025-05-24 17:11:12 +02:00
LICENSE Initialise project 2019-09-05 16:46:13 +02:00
main.go Make things work with API v8 and fix cryptocurrency conversion 2021-02-11 20:40:06 +01:00
quizload.go Initialise project 2019-09-05 16:46:13 +02:00
quizrun.go Make things work with API v8 and fix cryptocurrency conversion 2021-02-11 20:40:06 +01:00
quizvalidate.go Initialise project 2019-09-05 16:46:13 +02:00
quizvalidate_test.go Initialise project 2019-09-05 16:46:13 +02:00
README.md Initialise project 2019-09-05 16:46:13 +02:00
utils.go Fix yahoo currency bug 2025-05-24 16:06:27 +02:00

kanjiquizbot

Kanji Quiz Bot for Discord written in Go

Quiz data is stored in .json files inside the quizzes folder. The format used is:

{
	"description": "A test deck",
	"deck": [
		{ "question": "未来",	"answers": [ "みらい" ] },
		{ "question": "On-yomi for 回",	"answers": [ "え", "かい" ] }
	]
}

Use this URL to invite your bot to a server:
https://discordapp.com/oauth2/authorize?scope=bot&client_id=BOT_CLIENT_ID_GOES_HERE
after creating an app with the Discord API.

Uses the DiscordGo project for API bindings and whatnot, and Golang Freetype to draw fonts on an image.

Command List

Games
kq!help - shows help message.
kq!quiz <deck> [optional max score] - runs a quiz with the specified deck until a player reaches optional max score.
kq!stop - ends a running quiz immediately.
kq!list - shows a full list of loaded quizzes.
kq!mad/fast/quiz/mild/slow <deck> - for 0/1/2/3/5 second answer windows instead.
kq!flash <deck> - for no pause between questions.
kq!gauntlet <deck> - runs a kanji time trial in Direct Message.
kq!scramble [easy/normal/hard/insane] - runs an English Word Scramble quiz with varying word length limits.

Utilities
kq!k <kanji> - displays kanji information.
kq!f <word> - shows usage frequency statistics for given Japanese word.
kq!p <word> - shows pitch accent information for given word.
kq!c <X currency in Y currency> - converts between given currencies.
kq!time - shows current time in UTC.
kq!ping - measures the bot's latency to the server.
kq!draw <text> - creates an image with given text drawn on it.

Administration
kq!uptime - shows how long the bot has been running.
kq!ongoing - shows currently active quiz sessions.
kq!output - locks Gauntlet score announcements to current channel.
kq!reload - reloads the quiz list file for live quizzing adjustments.