/rewrite/core branch. Thank you.Silk is a simple, and, the fastest Discord bot written in C# until proven otherwise. Built on top of DSharpPlus for Discord API interactions. The goal of Silk! is be not only a great bot, but fill in the gaps that certain bots have. A bot your members will want to use, while not being a cookie-cutter game, moderation, or entertainment bot. Silk! is also made with large guilds in mind. Feel free to join the Silk! server to ask any questions you may have or any general support you may need. Want this bot on your server? Feel free to invite it!
Silk! Is an open source bot, obviously, and if you know C#, you're more than welcome to contribute! If you're on the server, and your PR gets merged, you get a nice light blue role on the server to signify your contributions. Active contributors are given a special role as well.
Silk uses PostgreSQL for its backend database store. So if you don't have PostgreSQL installed, make sure to install it before trying to run the Visual Studio solution.
Discord Token and Database Connection String, Silk uses an appSettings.json file.When you clone Silk, before running the Visual Studio solution, you'll need to create this appSettings.json file in the following directory: Silk\src\Silk.Core
Now that the configuration file has been created, you'll need to fill out the structure:
{
"ConnectionStrings": {
"dbConnection": "",
"botToken": ""
}
}
dbConnection property, in the double quotes, add your connection string.
Server=;Database=;Username=;Password=botToken property, in the double quotes, add your Discord Bot Token.
Bot in the menu, and you should be able to Reveal your token from there.The alternative, and more recommended (but still NOT suitable for Production) for managing the configuration file is using User Secrets
The great advantage of using User Secrets, is that the file is stored in a separate location from the project tree, and because of this, secrets also aren't checked into source control.
UserSecretsId is defined:
<UserSecretsId>VelvetThePanda-SilkBot</UserSecretsId>
secrets file is different between Operating Systems, but in a system-protected user profile folder on your computer.
%APPDATA%\Microsoft\UserSecrets\VelvetThePanda-SilkBot\secrets.json~/.microsoft/usersecrets/VelvetThePanda-SilkBot/secrets.jsonappSettings.json approach
If you're starting fresh, just cloned the repo, then you'll need to make sure you've done the needed configuration, before running or debugging Silk.
If you're already using Silk, you may need to do any or all of the following to ensure that you have everything you need to run the latest and greatest!
If you have dotnet ef command line tools installed, you can run the following command in the src/Silk.Core folder to apply the latest migration
dotnet ef database update
dotnet ef command line tool by following this document Entity Framework Core Tools CLIIf you're using Visual Studio you can this command using the Package Manager Console
Update-Database
Package Manager Console tools by following this document Entity Framework Core Tools - Package Manager Console in Visual StudioTo run Silk! as a docker container, you can simply create an appSettings.json file in the root directory, and run docker pull velvetthepanda/silk, assuming you have a postgres database running already. If not, you can download a pre-configured docker-compose file here.
Both Postgres and Silk! will have to initialize on the first run, which may cause slightly degraded startup times as Silk! creates requisite tables on the database.
Further startup times should be no more than ~3 seconds to fully initialize and do cache runs.

Content type
Image
Digest
sha256:be2a1cbf1…
Size
100.3 MB
Last updated
over 3 years ago
docker pull velvetthepanda/silk:278