mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2025-01-12 18:30:34 +00:00
gobot:: Discord bot token set via env variable
This commit is contained in:
parent
c89d98e832
commit
529e27ea2f
@ -748,8 +748,10 @@ void go_discord() {
|
||||
#if AEGIS
|
||||
bot_thread = std::thread([] {
|
||||
println(hlog, "starting bot");
|
||||
char *token = getenv("GOBOT_TOKEN");
|
||||
if(!token) throw hr_exception("set the env variable GOBOT_TOKEN to the Discord bot token to run gobot");
|
||||
uint64_t intents = dpp::i_default_intents | dpp::i_message_content;
|
||||
dpp::cluster bot(AEGIS_TOKEN, intents);
|
||||
dpp::cluster bot(token, intents);
|
||||
pbot = ⊥
|
||||
std::mutex lock;
|
||||
println(hlog, "on_message_create");
|
||||
|
Loading…
Reference in New Issue
Block a user