{"id":13701929,"url":"https://github.com/FluxpointDev/RevoltSharp","last_synced_at":"2025-05-05T04:30:37.944Z","repository":{"id":44597017,"uuid":"405766716","full_name":"FluxpointDev/RevoltSharp","owner":"FluxpointDev","description":"A C# lib for using the revolt chat API and connecting to the gateway to get events.","archived":false,"fork":false,"pushed_at":"2025-03-30T15:36:21.000Z","size":1472,"stargazers_count":17,"open_issues_count":0,"forks_count":4,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-30T16:29:06.552Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://rvlt.gg/N33Rf6DE","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/FluxpointDev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"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,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"patreon":"fluxpointdev","custom":"https://fluxpoint.dev/donate"}},"created_at":"2021-09-12T22:25:32.000Z","updated_at":"2025-03-30T15:36:26.000Z","dependencies_parsed_at":"2024-10-24T20:48:23.800Z","dependency_job_id":"9dcb709c-60ff-4da7-b0d8-f6fe727d7446","html_url":"https://github.com/FluxpointDev/RevoltSharp","commit_stats":null,"previous_names":["xxbuilderbxx/revoltsharp"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FluxpointDev%2FRevoltSharp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FluxpointDev%2FRevoltSharp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FluxpointDev%2FRevoltSharp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FluxpointDev%2FRevoltSharp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/FluxpointDev","download_url":"https://codeload.github.com/FluxpointDev/RevoltSharp/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252439364,"owners_count":21747993,"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":[],"created_at":"2024-08-02T21:00:27.713Z","updated_at":"2025-05-05T04:30:37.939Z","avatar_url":"https://github.com/FluxpointDev.png","language":"C#","funding_links":["https://patreon.com/fluxpointdev","https://fluxpoint.dev/donate"],"categories":["💻 API Libraries"],"sub_categories":["C#"],"readme":"# Info\nRevoltSharp is a bot lib used to connect to [Revolt](https://revolt.chat/) chat app.\n\nThis lib supports both bots and user accounts.\n\n### Core Features\n- `Stability:` The lib is designed to handle errors and exceptions with logging and nice error messages to help you build a public bot.\n- `Easy to Use:` RevoltSharp has similar design principals to discord.net with easy to use objects and properties.\n- `Connection:` The WebSocket is error proof and will keep the connection alive even during an outage or unstable network!\n- `Efficient:` You can run a private 1 server bot using 30mb of ram (with command handling, commands and cache) or a public bot in 450+ servers with 210mb of ram that can run on any $3 hosting service with 1GB ram!\n- `Cache:` The lib will cache reuseable data for an easy to use and fast experience, especially with events.\n- `Requests:` You can send custom requests using Client.Rest.SendRequest that uses disposable streams and buffers for memory efficiency.\n- `Documented:` Most of the code is documented with xml code comments or you can see the docs here https://docs.fluxpoint.dev/revoltsharp\n- `Command Handler:` RevoltSharp has a built-in command handler that can parse commands with a prefix and you can create command modules to run code.\n\n# Support\nJoin the RevoltSharp server for support and meet other C# developers!\n\nhttps://rvlt.gg/N33Rf6DE\n\n# Documentation\nThe library is documented in code and also has a docs site that you can browser with guides!\n\nhttps://docs.fluxpoint.dev/revoltsharp\n\n# Install\nYou can download the lib in visual studio/code using this [Nuget Package](https://www.nuget.org/packages/RevoltSharp)\n\nOnce it's installed you can use this basic example.\n```cs\nstatic void Main(string[] args)\n{\n    Start().GetAwaiter().GetResult();\n}\n\npublic static RevoltClient Client;\npublic static async Task Start()\n{\n    Client = new RevoltClient(ClientMode.WebSocket);\n    await Client.LoginAsync(Token, AccountType.Bot);\n    await Client.StartAsync();\n    await Task.Delay(-1);\n}\n```\n\n# Commands\nThis lib also includes and easy to use command system for setting up commands and using data.\nBig thanks to [Discord.net](https://github.com/discord-net/Discord.Net) for the internal command handler system, this was modified to work with Revolt and the classes.\n\nHere is an example on how to setup commands.\n```cs\nclass Program\n{\n    static void Main(string[] args)\n    {\n        Start().GetAwaiter().GetResult();\n    }\n\n    public static RevoltClient Client;\n    public static async Task Start()\n    {\n        Client = new RevoltClient(\"Bot Token\", ClientMode.WebSocket);\n        await Client.StartAsync();\n        CommandHandler Commands = new CommandHandler(Client);\n        Commands.Service.AddModulesAsync(Assembly.GetEntryAssembly(), null);\n        await Task.Delay(-1);\n    }\n}\n\npublic class CommandHandler\n{\n    public CommandHandler(RevoltClient client)\n    {\n        Client = client;\n        client.OnMessageRecieved += Client_OnMessageRecieved;\n    }\n    public RevoltClient Client;\n    public CommandService Service = new CommandService();\n    private void Client_OnMessageRecieved(Message msg)\n        {\n            UserMessage Message = msg as UserMessage;\n            if (Message == null || Message.Author.IsBot)\n                return;\n            int argPos = 0;\n            if (!(Message.HasCharPrefix('!', ref argPos) || Message.HasMentionPrefix(Client.CurrentUser, ref argPos)))\n                return;\n            CommandContext context = new CommandContext(Client, Message);\n            Service.ExecuteAsync(context, argPos, null);\n        }\n}\n```\n\n### Create a command\n```cs\npublic class CmdTest : ModuleBase\n{\n    [Command(\"hi\")]\n    public async Task Hi()\n    {\n        await ReplyAsync(\"Hi \" + Context.User.Username);\n    }\n\n    [Command(\"say\")]\n    public async Task Say([Remainder] string text)\n    {\n        await ReplyAsync(text);\n    }\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FFluxpointDev%2FRevoltSharp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FFluxpointDev%2FRevoltSharp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FFluxpointDev%2FRevoltSharp/lists"}