Creating a bot using a SPM project (Recommended)
Don't have a project to use DiscordKit with? These instructions are for you!
Prerequisites
Creating a Swift CLI package
Open a terminal window, then create a new directory for your project to live in, and then change directory into it:
mkdir MyWonderfulBot
cd MyWonderfulBot
Create a new swift package with the following command (Don't forget the
--type=executable
otherwise you won't be able to run your bot)
swift package init --type=executable
And that's it! If you're using Xcode, open the Package.swift file so that Xcode knows to load the package. If you're using a different editor, such as VSCode, open the entire folder.
Last updated