zekrotja / ken Goto Github PK
View Code? Open in Web Editor NEWA cutting edge (haha), object-oriented and highly modular application command handler for Discordgo.
Home Page: https://pkg.go.dev/github.com/zekrotja/ken
License: MIT License
A cutting edge (haha), object-oriented and highly modular application command handler for Discordgo.
Home Page: https://pkg.go.dev/github.com/zekrotja/ken
License: MIT License
Hello,
With a RespondEmbed I don’t see that DeleteAfter is available nor do I see a way to delete it in general. Is it still possible to delete it somehow?
Thank you
As we discussed, this project needs an implementation for guild scoped slash commands, especially for faster testing commands.
As the documentation says.
Global commands are cached for 1 hour. That means that new global commands will fan out slowly across all guilds, and will be guaranteed to be updated in an hour.
read more
and
Guild commands update instantly. We recommend you use guild commands for quick testing, and global commands when they're ready for public use.
read more
as it seems, they differ only by the URL
url = "https://discord.com/api/v8/applications/<my_application_id>/commands"
url = "https://discord.com/api/v8/applications/<my_application_id>/guilds/<guild_id>/commands"
and in the official discord-go library it's also just a small change
// ApplicationCommandCreate creates a global application command and returns it.
// appID : The application ID.
// guildID : Guild ID to create guild-specific application command. If empty - creates global application command.
// cmd : New application command data.
func (s *Session) ApplicationCommandCreate(appID string, guildID string, cmd *ApplicationCommand) (ccmd *ApplicationCommand, err error) {
so as I see, we need only replace the default value right here, to a guild-id to register commands in a smaller scope
ccmd, err = s.ApplicationCommandCreate(e.User.ID, "", toApplicationCommand(cmd))
RegisterCommands
and registerCommand
and rename the new version to something like RegisterCommandsByGuildID
and registerCommandByGuildID
Sending Ctx#FollowUp
after Ctx#Defer
sometimes lead to an interaction failed
error.
This might be cause by waiting for server response.
Lines 71 to 75 in 281f024
It might also be a timing issue that the follow up arrives at the server earlier than the defer. This might be tested further.
I've been trying to edit embeds with the new "api" it doesn't seem to work.
Hi, I'm starting to use Ken on a new project. But when I register a listener to discordgo.InteractionCreate
events I got panic: MessageComponentData called on interaction of type ApplicationCommand
. There is any way to continue using ken and also listen to InteractionCreate?
Currently, message components are added after the message has been sent by editing the message. Unfortunately, this does not work with ephemeral messages, so it should be possible to send a follow-up message with message components already attached on sending the message.
This issue is related to zekroTJA/shinpuru#394.
Hello,
Recently, discord rolled out a new feature allowing bots to be linked to a user and used in DM's upon other things. Discordgo currently has an open pull request to adapt this feature, but I assume it will be merged soon. It would be very nice to have ken also able to support these commands in direct messages.
No response
Add support for Modal Interactions.
Added to discordgo here.
Add bindings for the autocomplete feature for application commands.
This is related to zekroTJA/shinpuru#439.
No response
Because only 200 commands can be created at one day, it would be better for development if commands registered could be temporarily saved and then updated instead of deleted and re-created.
This would require some kind of temporary command store to save to and read commands from.
There should be an endpoint on Ken
like GetCommandInfo()
which returns a list of all registered commands with their details.
It should also be possible to pass custom info parsers to ensure availability of additional fields added via custom command implementations.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.