Comments (8)
Latest dev works like a charm, thanks @lcsmuller!
from concord.
Cool, I'll just use the dev branch for now.
from concord.
Thanks for notifying us - are you able to replicate this bug from the dev
branch?
from concord.
@lcsmuller indeed. I can tell the function name was renamed (an 's' was appended), but it still takes a discord_application_commands
struct, so I'm assuming it's still putting "id":0
for all of the commands in the request body.
Here's the actual Discord API response btw:
02:59:05 ERROR discord-rest_request.c:382: [DISCORD_REQUEST] {"code": 50035, "errors": {"0": {"_errors": [{"code": "APPLICATION_COMMANDS_INVALID_ID", "message": "Invalid application command id provided"}]}}, "message": "Invalid Form Body"}
from concord.
Please give latest dev
a try, if you're doing a git pull
make sure to run make purge
first so gencodecs
files are generated from scratch.
from concord.
BTW, since I'm not familiar with your release schedule, when can I expect a new release to come out for the fix?
from concord.
BTW, since I'm not familiar with your release schedule, when can I expect a new release to come out for the fix?
Hopefully soon but we still got a couple things that needs to be tackled first. You can keep track of #74 to know when the next release has been merged, or join our Discord server to get notified.
from concord.
I'm using dev version of library and this still doesn't work.
Reproduction:
- Library installation
git clone https://github.com/Cogmasters/concord
cd concord
git checkout dev
make
sudo make install
- Code
#include <concord/discord.h>
#include <string.h>
void on_ready(struct discord *client, const struct discord_ready *event) {
struct discord_create_global_application_command params = {
.name = "example", .description = "example description"};
discord_bulk_overwrite_global_application_commands(
client, event->application->id, ¶ms, NULL);
}
void on_interaction(struct discord *client,
const struct discord_interaction *event) {
if (event->type != DISCORD_INTERACTION_APPLICATION_COMMAND)
return; /* return if interaction isn't a slash command */
if (strcmp(event->data->name, "example") == 0) {
struct discord_interaction_response params = {
.type = DISCORD_INTERACTION_CHANNEL_MESSAGE_WITH_SOURCE,
.data = &(struct discord_interaction_callback_data){.content = "pong"}};
discord_create_interaction_response(client, event->id, event->token,
¶ms, NULL);
}
}
int main() {
struct discord *client = discord_init("PASTE YOUR TOKEN HERE!");
discord_set_on_ready(client, &on_ready);
discord_set_on_interaction_create(client, &on_interaction);
discord_run(client);
return 0;
}
- Compilation command
clang main.c -o main -g -ldiscord -lcurl
from concord.
Related Issues (20)
- Support HTTP 1.1
- Add guides to Concord HOT 11
- Websocket payloads taking long to be sent HOT 3
- Chash (used on Concord) possible not working on FreeBSD HOT 1
- Segfault due to race conditions in discord_cleanup when called from another thread HOT 7
- Incomplete presence info and guild members HOT 15
- discord_modify_channel rtc_region issue HOT 2
- Insufficient buffer size causes truncation, malformed request
- Signal Safety in concord-once.h HOT 2
- Make Error - Windows, Cygwin HOT 3
- WebSocket upgrade fails with 'server didn't accept the websocket upgrade' error when using an HTTP proxy HOT 1
- Raspberry Pi (64-bit) library setup problem HOT 3
- Easy server member permission checking HOT 1
- Wrong compiler for discord_codecs breaks cross HOT 6
- User-defined memory functions HOT 4
- Ship a pkg-config file
- messages: Support silent flag HOT 12
- `DISCORD_MAX_MESSAGE_LEN` has the wrong value HOT 3
- Enums to pointer to enums
- Pass additional data to callbacks HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from concord.