Cogmasters/concord

Add guides to Concord

lcsmuller opened this issue ยท 11 comments

Describe the feature

This issue is for keeping track of the many guides that should help make Concord a more welcoming place to newcomers. If you got any suggestions, feel free to write them down below!

NOTE: all of the following should be added to docs/guides/

Acceptance criteria

  • Add installation & preparations guide
    • How to install concord
    • Setting up a bot application
    • Adding bot to servers
  • Getting the bot started
    • Setting up with the config.json files
    • Setting up with env variables
  • Miscellaneous
    • FAQ
    • Concord's async workflow
    • Concord's timers
    • Concord's caching
    • Concord's dispatcher
    • Sending attachments
    • Slash Commands
    • Message Components
    • Threads
    • Embeds
    • Reactions
    • Permissions
    • Gateway intents
    • Webhooks
    • Errors
    • Audit Logs
  • Other topics
    • Using a DB with concord
    • Debugging (GDB, Valgrind, ...)
    • Managing your bot process
    • Architecture
    • C99 syntax quirks used by Concord (with emphasis on Designated Initializers and Compound Literals)
    • Concord on old systems
    • Using an external SSL proxy
  • Internal
    • Gencodecs
    • Makefile build-system (explain BSD Make quirks)

Version

v2.1.0

I'll get most of these done, in addition to guides covering

  • Concord on a VAX (with native SSL)
  • Concord on Solaris 9
  • SSL certificate pinning with libcurl and Concord
  • Using Concord natively on Windows
  • Windows SSL API

A question about a feature: how do I set a bot's status to do not disturb then back to online in C?

You can do that with discord_update_presence(), here is an example for reference!

Thanks. And, is there a way to enable all intents?

discord_add_intents() will do the trick, you can find some of the predefined intents here. If you want to enable all intents you may simply pass it a UINT64_MAX flag from stdint.h (doesn't work)

discord_add_intents() will do the trick, you can find some of the predefined intents here. If you want to enable all intents you may simply pass it a UINT64_MAX flag from stdint.h

It immediately fails with that trick for some reason.

All intents should be good on the website-end of things:
image

It immediately fails with that trick for some reason.

You got some logs? (make sure to enable logging at your config.json)

It immediately fails with that trick for some reason.

You got some logs? (make sure to enable logging at your config.json)

Logging does not seem to be working with running clang main.c -o myBot -pthread -ldiscord -lcurl; ./myBot. "quiet" is also set to false in the log.

Though, at least using strerror, I get Policy not found.

It immediately fails with that trick for some reason.

You got some logs? (make sure to enable logging at your config.json)

Sorry, my bad; works differently than I thought.

23:06:06 WARN  discord-gateway.c:358: [DISCORD_GATEWAY] CLOSE DISCORD_GATEWAY_CLOSE_REASON_INVALID_INTENTS (code: 4013, 18 bytes): 'Invalid intent(s).'
23:06:06 WARN  discord-gateway.c:394: [DISCORD_GATEWAY] Gateway will not attempt to reconnect
23:06:06 WARN  discord-gateway.c:792: [DISCORD_GATEWAY] Discord Gateway Shutdown

Yeah then forget about that trick.. I assumed just filling up all uint64_t bits with 1 would work. Concord automatically sets the intent for you based on the events you want to listen to, but in case you still want to set the intents manually you can use an Intents Calculator and then enter that value to discord_add_intents().

Yeah then forget about that trick.. I assumed just filling up all uint64_t bits with 1 would work. Concord automatically sets the intent for you based on the events you want to listen to, but in case you still want to set the intents manually you can use an Intents Calculator and then enter that value to discord_add_intents().

That seems to work; thank you. I also just found the Discord server link lol to ask there in the future.