Skip to content
Cyteon edited this page Nov 11, 2024 · 4 revisions

Getting started

Create a new gleam project

gleam new my_bot
cd my_bot

Install discord_gleam

gleam add discord_gleam

Run a bot

import discord_gleam/discord/intents
import discord_gleam
import logging

fn main() {
  logging.configure()

  let bot = discord_gleam.bot("YOUR TOKEN", intents.Intents(message_content: True, guild_messages: True))
  discord_gleam.run(bot, [])
}
Clone this wiki locally