{"id":17318774,"url":"https://github.com/velvettoroyashi/silk","last_synced_at":"2025-04-14T13:32:30.046Z","repository":{"id":37025827,"uuid":"283636077","full_name":"VelvetToroyashi/Silk","owner":"VelvetToroyashi","description":"Feature-rich bot aiming to satisfy moderation \u0026 entertainment needs.","archived":false,"fork":false,"pushed_at":"2023-07-29T22:00:11.000Z","size":9547,"stargazers_count":62,"open_issues_count":10,"forks_count":20,"subscribers_count":4,"default_branch":"development","last_synced_at":"2024-11-01T04:51:45.378Z","etag":null,"topics":["bot","discord","discord-bot","silk"],"latest_commit_sha":null,"homepage":"https://silkbot.cc","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/VelvetToroyashi.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":".github/CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null},"funding":{"github":null,"patreon":"VelvetThePanda","open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"custom":null}},"created_at":"2020-07-30T01:06:01.000Z","updated_at":"2024-10-27T19:18:07.000Z","dependencies_parsed_at":"2023-02-18T19:31:27.711Z","dependency_job_id":"2e15e3e3-b56f-4099-aecf-45a420c9e2b3","html_url":"https://github.com/VelvetToroyashi/Silk","commit_stats":null,"previous_names":["vtpdevelopment/silk"],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VelvetToroyashi%2FSilk","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VelvetToroyashi%2FSilk/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VelvetToroyashi%2FSilk/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VelvetToroyashi%2FSilk/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/VelvetToroyashi","download_url":"https://codeload.github.com/VelvetToroyashi/Silk/tar.gz/refs/heads/development","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223634176,"owners_count":17176879,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bot","discord","discord-bot","silk"],"created_at":"2024-10-15T13:20:58.887Z","updated_at":"2025-04-14T13:32:30.026Z","avatar_url":"https://github.com/VelvetToroyashi.png","language":"C#","funding_links":["https://patreon.com/VelvetThePanda"],"categories":[],"sub_categories":[],"readme":"# Silk!\n\n\u003e [!IMPORTANT]\n\u003e Due to unfortunate circumstances, Silk! will remain in a sort of maintanence-limbo. The database migrations have left Silk! in a very fragile state, and updating the bot has proven challenging. For this reason (and having already left this project to waste in favor of other projects), this repo will be archived.\n\nSilk! is a simple Discord bot written in C#. Silk! is built on top of the [Remora.Discord](https://github.com/Nihlus/Remora.Discord) .NET Discord library, with the goal to not only be a great bot but to also fill in the gaps that some bots have. Silk! aims to be 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](https://silkbot.cc/discord) 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!](https://silkbot.cc/invite)\n\n[![Code Quality](https://www.codefactor.io/repository/github/VTPDevelopment/Silk/badge)](https://www.codefactor.io/repository/github/VTPDevelopment/silk)  \n![Code Size](https://img.shields.io/github/languages/code-size/VTPDevelopment/Silk)  \n![Lines of Code](https://img.shields.io/tokei/lines/github/VTPDevelopment/Silk)  \n![GitHub Closed Issues](https://img.shields.io/github/issues-closed-raw/VelvetThePanda/Silk)  \n![Discord](https://img.shields.io/discord/721518523704410202)\n\n---\n\n## **Development**\n\nSilk! is an open-source bot, 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.\n\n### **Resources**\n\n- [Redis](https://redis.io/)\n- [PostgreSQL](https://www.postgresql.org/)\n- [App Secrets](https://docs.microsoft.com/en-us/aspnet/core/security/app-secrets)\n- [Discord Developer Portal](https://discord.com/developers)\n\n---\n\n### **Database**\n\nSilk! uses [PostgreSQL](https://www.postgresql.org/) 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.\n\n---\n\n### **Configuration / Secrets Management**\n\nTo manage storage of the needed `Discord Bot Token`, `Database Connection String`, and other important project configuration / settings, Silk! uses an `appSettings.json` file.\n\n#### **Default**\n\n#### When you clone Silk!, before running the project, you'll need to edit the template `appSettings.json` file in the following directory: `src\\Silk`\n\nFor the **Database**, look for the `Persistence` section of the file, it will look something like this:\n\n```json\n\"Persistence\": {\n\"Host\": \"localhost\",\n\"Port\": \"5432\",\n\"Database\": \"silk\",\n\"Username\": \"silk\",\n\"Password\": \"silk\"\n}\n```\n\nFrom there, just give the `Username` key a value (database user), and the `Password` key a value (password for the Postgres user).\n\nFor the **Discord Bot Token**, look for the `Discord` section of the file, it will look something like this:\n\n```json\n\"Discord\": {\n  \"Shards\": 1,\n  \"ClientId\": \"\",\n  \"ClientSecret\": \"\", \n  \"BotToken\": \"\"\n}\n```\n\nFrom there, just give the `BotToken` key a value (your Discord Bot Token). If you are just starting with Discord Bots, then you can generate your Token and then copy it into your configuration file (use App Secrets!) - [Discord Developer Portal](https://discord.com/developers).\n\nOnce there, locate and click the **Applications** menu item (usually in left side menu), then click on your application. Then you can either generate your token, or if you already have a bot, see if you can get the Token from existing application configuration that you're using, otherwise you'll need to reset your Token to have it revealed.\n\n---\n\n### Plugins + Redis\n\nSilk! uses [Redis](https://redis.io/) for caching, and has a nifty plugin system using `Remora.Plugins`. These two pieces need just a bit of configuration, so please make sure not to skip!\n\nIn the same template `appSettings.json`, look for the following two sections: **Plugins**, **Redis**\n\nThe **Plugins** section will look something like this:\n\n```json\n\"Plugins\": {\n  \"RoleMenu\": {\n    \"Database\": \"Host=localhost;Port=5432;Database=silk_role_menu;Username=silk;Password=silk\"\n  }\n}\n```\n\nMake sure to fill the `Password` part of the connection string for the RoleMenu plugin.\n\nFor the **Redis** section, it will look something like this:\n\n```json\n\"Redis\": {\n  \"Host\": \"localhost\",\n  \"Port\": \"6379\",\n  \"Password\": \"\"\n}\n```\n\nLike above, make sure to fill the `Password` part of the connection string for `Redis`, and make any other needed changes to the Redis configuration (host or port changes).\n\n---\n\n### **App Secrets**\n\nThe alternative, and more recommended way (but still **NOT** suitable for `Production`) for managing the configuration file is using `User Secrets`\n\nThe advantage of using User Secrets, is that the file is stored in a separate location from the project tree. Because of this, those secrets aren't checked into source control.\n\nThe location of the `secrets.json` file is different between Operating Systems, but it's stored in a system-protected user profile folder on your computer.\n\n**Windows**\n- `%APPDATA%\\Microsoft\\UserSecrets\\VelvetThePanda-SilkBot\\secrets.json`\n\n**Mac / Linux**\n- `~/.microsoft/usersecrets/VelvetThePanda-SilkBot/secrets.json`\n\nIn the `Silk` project, a `UserSecretsId` property is defined in the `Silk.csproj` file which looks like this:\n\n```xml\n\u003cUserSecretsId\u003eVelvetThePanda-Silk\u003c/UserSecretsId\u003e\n```\n\nThe structure for the file is the same for the [Default](#default) - `appSettings.json` approach. Copy what's in that template and paste it in the `secrets.json` file. Then fill in the needed pieces and you're good to go!\n\n---\n\n### Running the Project\n\nBefore you start, you will want to make sure that you have both Postgres and Redis running and available to Silk!. If the services are running in docker, you'll wanna make sure that the appropriate ports are exposed on the container (`5432` and `6379` respectively).\n\nIf Silk! is also running in Docker, ensure that it's within the same network as both Postgres and Redis. To connect, simply reference the container name instead of `localhost` or an IP (e.g. `Server=silk`).\n\nIf you're starting fresh, just cloned the repo, then you'll need to make sure you've done the needed [Configuration](#configuration--secrets-management), before running or debugging Silk!.\n\nIf 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!\n\nSilk! will automatically apply any applicable migrations to the database. If you're starting with a clean database, this may take a few seconds.\n\n---\n\n## Self-hosting\n\n### Self-hosting Silk! is easy. Instructions have been provided to self-host locally.\n\n### Docker\n\nTo 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](https://files.velvetthepanda.dev/docker-compose.yml).\n\nThe latest build can be viewed on [Docker Hub](https://hub.docker.com/r/velvetthepanda/silk/tags)\n\n![Silk! Logo](https://files.velvetthepanda.dev/silk.png)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvelvettoroyashi%2Fsilk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvelvettoroyashi%2Fsilk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvelvettoroyashi%2Fsilk/lists"}