mod: remove guild identifier limitation
build / docker (push) Failing after 4m48s

This commit is contained in:
2026-08-11 14:28:54 -04:00
parent 8a53715149
commit a4da7263c5
3 changed files with 10 additions and 21 deletions
-1
View File
@@ -30,7 +30,6 @@ If you are running `nix` or NixOS, you should probably run the provided `flake.n
Running the binary by itself won't do anything. In fact, the bot will just quit if you don't have the needed information. You will need to have the following:
- A Discord token - `DISCORD_TOKEN`
- A guild ID - `GUILD_ID`
_OR_
-1
View File
@@ -8,7 +8,6 @@ services:
LETSENCRYPT_HOST:
LETSENCRYPT_EMAIL:
## Fill these in when you deploy
# GUILD_ID:
# DISCORD_TOKEN:
#
# OR FILL THESE IN INSTEAD
+2 -11
View File
@@ -2,9 +2,8 @@ use std::env;
use serenity::async_trait;
use serenity::builder::{CreateInteractionResponse, CreateInteractionResponseMessage};
use serenity::model::application::Interaction;
use serenity::model::application::{Command, Interaction};
use serenity::model::gateway::Ready;
use serenity::model::id::GuildId;
use serenity::prelude::*;
use crate::commands;
@@ -35,15 +34,7 @@ impl EventHandler for Handler {
async fn ready(&self, ctx: Context, ready: Ready) {
println!("{} is connected!", ready.user.name);
let guild_id = GuildId::new(
env::var("GUILD_ID")
.expect("Expected GUILD_ID in environment")
.parse()
.expect("GUILD_ID must be an integer"),
);
let cmds = guild_id
.set_commands(
let cmds = Command::set_global_commands(
&ctx.http,
vec![
commands::roll::register(),