https://github.com/nuclearace/swiftbot
A bot to showcase SwiftDiscord
https://github.com/nuclearace/swiftbot
discord-bot showcase swift
Last synced: about 1 year ago
JSON representation
A bot to showcase SwiftDiscord
- Host: GitHub
- URL: https://github.com/nuclearace/swiftbot
- Owner: nuclearace
- Created: 2017-01-08T20:19:09.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2019-12-01T22:11:53.000Z (over 6 years ago)
- Last Synced: 2025-05-13T12:48:11.811Z (about 1 year ago)
- Topics: discord-bot, showcase, swift
- Language: Swift
- Size: 189 KB
- Stars: 5
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# SwiftBot
A bot to showcase [SwiftDiscord](https://github.com/nuclearace/SwiftDiscord)
SwiftBot is designed to be used in many large guilds, and as such, is a distributed bot. That is, there are multiple shard processes created for one "bot". The number of processes spawned is controlled by `numberOfShards` in config.swift located in `Shared`. This can be set to one if you only want a single shard instance running.
The bot is made of one module, and two executables.
Shared
------
Contains the config file, and a set of utilities.
SwiftShard
--------
Is an actual shard executable, and contains the logic for commands, guilds, etc. This executable is not meant to be launched directly. Instead `SwiftBot` should be used.
SwiftBot
-------------------
Is the controller for all of the shards. It is responsible for keeping the shards alive, should one of them die. It also responsible for global api rate limits, such as the Wolfram-Alpha limit. If a shard wishes to remove a token from one of the limiters, it makes a RMI to see if it can make the request.