mirror of
				https://github.com/zenorogue/hyperrogue.git
				synced 2025-10-31 05:52:59 +00:00 
			
		
		
		
	gobot:: Discord bot token set via env variable
This commit is contained in:
		| @@ -748,8 +748,10 @@ void go_discord() { | |||||||
| #if AEGIS | #if AEGIS | ||||||
|   bot_thread = std::thread([] { |   bot_thread = std::thread([] { | ||||||
|     println(hlog, "starting bot"); |     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; |     uint64_t intents = dpp::i_default_intents | dpp::i_message_content; | ||||||
|     dpp::cluster bot(AEGIS_TOKEN, intents); |     dpp::cluster bot(token, intents); | ||||||
|     pbot = ⊥ |     pbot = ⊥ | ||||||
|     std::mutex lock; |     std::mutex lock; | ||||||
|     println(hlog, "on_message_create"); |     println(hlog, "on_message_create"); | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Zeno Rogue
					Zeno Rogue