general/utils/documentation.md
# Utils
Contains some utility commands for general use as well as for testing and development.
## `ping`
Determines the latency of the bot to Discord in milliseconds.
```css
.ping
```
## `snowflake`
Extracts and displays the timestamp from any [Discord snowflake ID](https://discord.com/developers/docs/reference#snowflakes){target=_blank}. It can be used to find out the date and time of creation of any Discord user, guild, channel, message, role, custom emoji or anything else that has an ID.
```css
.[snowflake|sf|time] <ID>
```
Arguments:
| Argument | Required | Description |
|:--------:|:-------------------------:|:-----------------|
| `ID` | :fontawesome-solid-check: | The snowflake ID |
## `encode`
Applies Python's [`str.encode` function](https://docs.python.org/3/library/stdtypes.html#str.encode){target=_blank} to the username and nickname of a given user.
```css
.[encode|enc] <user>
```
Argument:
| Argument | Required | Description |
|:--------:|:-------------------------:|:-------------------|
| `user` | :fontawesome-solid-check: | The user or member |
## `suggest_role_color`
Suggests the color for a new role, trying to avoid colors already in use. Optionally you can specify a list of colors to also avoid.
```css
.[suggest_role_color|rc] [avoid...]
```
Arguments:
| Argument | Required | Description |
|:--------:|:--------:|:-----------------------------------|
| `avoid` | | A list of color hex codes to avoid |
Required Permissions:
- `utils.suggest_role_color`