Browse Source

Improve readability

pull/988/head
Hsu Still 7 years ago
parent
commit
e124b65166
No known key found for this signature in database GPG Key ID: 8601A145FDA95209
2 changed files with 37 additions and 24 deletions
  1. +36
    -23
      docs/faq/getting-started.md
  2. +1
    -1
      docs/guides/introduction/intro.md

+ 36
- 23
docs/faq/getting-started.md View File

@@ -13,41 +13,54 @@ users can be assigned to.

[permission calculator]: https://finitereality.github.io/permissions-calculator

## What is a Client/User/Object ID? Is it the token?
## What is a token?

A token is a credential used to log into an account. This information
should be kept **private** and for your eyes only. Anyone with your
token can log into your account. This applies to both user and bot
accounts. That also means that you should never ever hardcode your
token or add it into source control, as your identity may be stolen
by scrape bots on the internet that scours through constantly to
obtain a token.

## What is a client/user/object ID?

Each user and object on Discord has its own snowflake ID generated
based on various conditions.

![Snowflake Generation](images/snowflake.png)

The ID can be seen by anyone; it is public. It is merely used to
identify an object in the Discord ecosystem. Many things in the
library require an ID to retrieve the said object.
Discord ecosystem require an ID to retrieve or identify the said
object.

There are 2 ways to obtain the said ID.
There are 2 common ways to obtain the said ID.

1. Enable Discord's developer mode. With developer mode enabled,
you can - as an example - right click on a guild and copy the guild
id (please note that this does not apply to all objects, such as
Role IDs \[see below], or DM channel IDs).
![Developer Mode](images/dev-mode.png)
2. Escape the object using `\` in front the object. For example,
when you do `\@Example#1234` in chat, it will return the user ID of
the aforementioned user.
### [Discord Developer Mode](#tab/dev-mode)

A token is a credential used to log into an account. This information
should be kept **private** and for your eyes only. Anyone with your
token can log into your account. This applies to both user and bot
accounts. That also means that you should never ever hardcode your
token or add it into source control, as your identity may be stolen
by scrape bots on the internet that scours through constantly to
obtain a token.
By enabling the developer mode you can right click on most objects
to obtain their snowflake IDs (please note that this may not apply to
all objects, such as role IDs, or DM channel IDs).

![Developer Mode](images/dev-mode.png)

### [Escape Character](#tab/escape-char)

You can escape an object by using `\` in front the object in the
Discord client. For example, when you do `\@Example#1234` in chat,
it will return the user ID of the aforementioned user.

***

## How do I get the role ID?

> [!WARNING]
> Right-clicking on the role and copying the ID will **not** work.
> This will only copy the message ID.

Several common ways to do this:

1. Make the role mentionable and mention the role, and escape it
1. Make the role mentionable and mention the role, and escape it
using the `\` character in front.
2. Inspect the roles collection within the guild via your debugger.

Please note that right-clicking on the role and copying the ID will
**not** work. It will only copy the message ID.
2. Inspect the roles collection within the guild via your debugger.

+ 1
- 1
docs/guides/introduction/intro.md View File

@@ -1,6 +1,6 @@
# Introduction

## How do I get started?
## Looking to get started?

First of all, welcome! You may visit us on our Discord should you
have any questions. Before you delve into using the library,


Loading…
Cancel
Save