
Research
/Security News
Critical Vulnerability in NestJS Devtools: Localhost RCE via Sandbox Escape
A flawed sandbox in @nestjs/devtools-integration lets attackers run code on your machine via CSRF, leading to full Remote Code Execution (RCE).
netcord.hosting.aspnetcore
Advanced tools
You can install NetCord packages via NuGet package manager:
Package | Description |
---|---|
NetCord | Core package with fundamental functionality. |
NetCord.Services | Facilitates seamless handling of commands and interactions. |
NetCord.Hosting | Provides .NET Generic Host extensions for the NetCord package. |
NetCord.Hosting.Services | Provides .NET Generic Host extensions for the NetCord.Services package. |
NetCord.Hosting.AspNetCore | Provides ASP.NET Core extensions for seamless handling of HTTP events. |
This snippet showcases a bot with a minimal API-style /square
command and includes a module-based /greet
command.
The following example sets up a bot with a minimal API-style approach for the /square
command, which calculates the square of a number:
var builder = Host.CreateDefaultBuilder(args)
.UseDiscordGateway()
.UseApplicationCommands();
var host = builder.Build()
.AddSlashCommand("square", "Square!", (int a) => $"{a}² = {a * a}")
.UseGatewayHandlers();
await host.RunAsync();
Of course, you can also use the bare-bones approach.
Moreover, you can use a module-based approach. Here's an example of a /greet
command that greets a specified user:
public class GreetingModule : ApplicationCommandModule<ApplicationCommandContext>
{
[SlashCommand("greet", "Greet someone!")]
public string Greet(User user) => $"{Context.User} greets {user}!";
}
NetCord's goal is to allow .NET developers to create fully customizable Discord bots without fighting the API wrapper itself. NetCord is designed to be easy to use and fully customizable, while still being lightweight and performant.
This repository is released under the MIT License.
NetCord follows a MAJOR.MINOR.PATCH
versioning scheme:
Our goal is to maintain stability while allowing for necessary evolution of the API.
FAQs
Unknown package
We found that netcord.hosting.aspnetcore demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
/Security News
A flawed sandbox in @nestjs/devtools-integration lets attackers run code on your machine via CSRF, leading to full Remote Code Execution (RCE).
Product
Customize license detection with Socket’s new license overlays: gain control, reduce noise, and handle edge cases with precision.
Product
Socket now supports Rust and Cargo, offering package search for all users and experimental SBOM generation for enterprise projects.