Skip to content

Commit

Permalink
fix example
Browse files Browse the repository at this point in the history
  • Loading branch information
cyteon committed Jul 25, 2024
1 parent 6fad0ff commit 792dddc
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions examples/slash_commands.gleam
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ import gleam/list
import gleam/string
import logging

pub fn main(token: String) {
pub fn main() {
logging.configure()
logging.set_level(logging.Info)

let bot = discord_gleam.bot(token)
let bot = discord_gleam.bot("YOUR TOKEN")

let test_cmd =
slash_command.SlashCommand(
Expand All @@ -36,10 +36,7 @@ pub fn main(token: String) {
options: [],
)

discord_gleam.register_commands(bot, "1262338071874244650", [
test_cmd,
test_cmd2,
])
discord_gleam.register_commands(bot, "YOUR BOT ID", [test_cmd, test_cmd2])

discord_gleam.run(bot, [event_handler])
}
Expand Down

0 comments on commit 792dddc

Please sign in to comment.