You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

getting-started.md 2.6 kB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. ---
  2. uid: FAQ.Basics.GetStarted
  3. title: Beginner Questions / How to Get Started
  4. ---
  5. # Basic Concepts / Getting Started
  6. ## How do I add my bot to my server/guild?
  7. You can do so by using the [permission calculator] provided
  8. by [FiniteReality].
  9. This tool allows you to set permissions that the bot will be assigned
  10. with, and invite the bot into your guild. With this method, bots will
  11. also be assigned a unique role that a regular user cannot use; this
  12. is what we call a `Managed` role. Because you cannot assign this
  13. role to any other users, it is much safer than creating a single
  14. role which, intentionally or not, can be applied to other users
  15. to escalate their privilege.
  16. [FiniteReality]: https://github.com/FiniteReality/permissions-calculator
  17. [permission calculator]: https://finitereality.github.io/permissions-calculator
  18. ## What is a token?
  19. A token is a credential used to log into an account. This information
  20. should be kept **private** and for your eyes only. Anyone with your
  21. token can log into your account. This risk applies to both user
  22. and bot accounts. That also means that you should **never** hardcode
  23. your token or add it into source control, as your identity may be
  24. stolen by scrape bots on the internet that scours through
  25. constantly to obtain a token.
  26. ## What is a client/user/object ID?
  27. Each user and object on Discord has its own snowflake ID generated
  28. based on various conditions.
  29. ![Snowflake Generation](images/snowflake.png)
  30. The ID can be seen by anyone; it is public. It is merely used to
  31. identify an object in the Discord ecosystem. Many things in the
  32. Discord ecosystem require an ID to retrieve or identify the said
  33. object.
  34. There are 2 common ways to obtain the said ID.
  35. ### [Discord Developer Mode](#tab/dev-mode)
  36. By enabling the developer mode you can right click on most objects
  37. to obtain their snowflake IDs (please note that this may not apply to
  38. all objects, such as role IDs, or DM channel IDs).
  39. ![Developer Mode](images/dev-mode.png)
  40. ### [Escape Character](#tab/escape-char)
  41. You can escape an object by using `\` in front the object in the
  42. Discord client. For example, when you do `\@Example#1234` in chat,
  43. it will return the user ID of the aforementioned user.
  44. ![Escaping mentions](images/mention-escape.png)
  45. ***
  46. ## How do I get the role ID?
  47. > [!WARNING]
  48. > Right-clicking on the role and copying the ID will **not** work.
  49. > This will only copy the message ID.
  50. Several common ways to do this:
  51. 1. Make the role mentionable and mention the role, and escape it
  52. using the `\` character in front.
  53. 2. Inspect the roles collection within the guild via your debugger.