This commit is contained in:
@@ -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_
|
||||
|
||||
|
||||
@@ -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
@@ -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(),
|
||||
|
||||
Reference in New Issue
Block a user