Are you sure you want to delete this task? Once this task is deleted, it cannot be recovered.
|
4 years ago | |
---|---|---|
.github | 6 years ago | |
azure | 5 years ago | |
docs | 4 years ago | |
experiment | 6 years ago | |
samples | 4 years ago | |
src | 4 years ago | |
test | 4 years ago | |
.editorconfig | 7 years ago | |
.gitattributes | 10 years ago | |
.gitignore | 4 years ago | |
CHANGELOG.md | 5 years ago | |
CONTRIBUTING.md | 6 years ago | |
Discord.Net.code-workspace | 6 years ago | |
Discord.Net.sln | 5 years ago | |
Discord.Net.sln.DotSettings | 6 years ago | |
Discord.Net.targets | 4 years ago | |
LICENSE | 6 years ago | |
README.md | 4 years ago | |
StyleAnalyzer.targets | 4 years ago | |
azure-pipelines.yml | 5 years ago | |
stylecop.json | 4 years ago |
This repo is a custom fork of Discord.Net that introduces the newest features of discord for testing and experimenting. Nothing here is guaranteed to work but you are more than welcome to submit bugs in the issues tabs
Labs will not work with Playwo's InteractivityAddon. The reason is that his package depends on the base discord.net lib, you can get around this by cloning his repo and building it with discord.net labs instead of discord.net.
Setting up labs in your project is really simple, here's how to do it:
The main branch we pull off of to introduce new features into, the dev branch is the same as Discord.Nets dev branch
This branch is for anything todo with Discord Interactions, such as Slash commands and Message Components. This branch is stable enough to use but does not contain all the features of interactions.
This branch is on pause and does not work currently, Once everything is stable with the Interaction branch we will continue working on a slash command service for it.
webmilio's spin on the SlashCommandService branch, again the state of this is unknown.
So, you want to use Message components? Well you're in luck! Below is a quick overview of how to use them
// Subscribe to the InteractionCreated event
client.InteractionCreated += Client_InteractionCreated;
...
private async Task Client_InteractionCreated(SocketInteraction arg)
{
// If the type of the interaction is a message component
if(arg.Type == Discord.InteractionType.MessageComponent)
{
// parse the args
var parsedArg = (SocketMessageComponent)arg;
// respond with the update message response type. This edits the original message if you have set AlwaysAcknowledgeInteractions to false.
await parsedArg.RespondAsync($"Clicked {parsedArg.Data.CustomId}!", type: InteractionResponseType.UpdateMessage);
}
}
Theres a new field in all SendMessageAsync
functions that takes in a MessageComponent
, you can use it like so:
var builder = new ComponentBuilder().WithButton("Hello!", ButtonStyle.Primary, customId: "id_1");
await Context.Channel.SendMessageAsync("Test buttons!", component: builder.Build());
Slash command example how to's can be found here. If you want to read some code using slash commands, you can do that here
No Description
C#
Dear OpenI User
Thank you for your continuous support to the Openl Qizhi Community AI Collaboration Platform. In order to protect your usage rights and ensure network security, we updated the Openl Qizhi Community AI Collaboration Platform Usage Agreement in January 2024. The updated agreement specifies that users are prohibited from using intranet penetration tools. After you click "Agree and continue", you can continue to use our services. Thank you for your cooperation and understanding.
For more agreement content, please refer to the《Openl Qizhi Community AI Collaboration Platform Usage Agreement》