Getting started with the template
Prerequisites
This guide assumes you have decent understanding of the Swift language and something to compile a Swift project on.
You also need a Discord bot. Create one here.
Getting the template
Download/clone the template here. However you set it up is your choice and out of scope for this guide. Typically, you should just download & unzip this repository, and open it in Xcode.
Filling out the token
Take a look at Sources/Bot.swift
. Notice line 17:
token: [Token Goes Here],
You should replace this with your bot’s token. This can be found in the portal, under your app, Bot > Reset Token. Never share this.
Once you’ve done this, the bot is ready to run. Run it however you’d like, whether that be the run button in Xcode, or using something like Docker.
What next?
Just experiment! Make something. Take a look at how the template works and what else you can do with it.
If you want to make more commands, messages, or whatever, read on.
Manually create a bot (legacy documentation)