Skip to content

Commit

Permalink
feat(docs): update modules
Browse files Browse the repository at this point in the history
  • Loading branch information
FedeIlLeone committed May 26, 2024
1 parent 9a66773 commit 0a09753
Show file tree
Hide file tree
Showing 17 changed files with 213 additions and 165 deletions.
10 changes: 10 additions & 0 deletions docs/plugins/modules/common/stores/channels.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import RequiredNotice from "@site/src/components/RequiredNotice.mdx";
| `getChannelId` | `guildId`: string <br /> `fallbackToDefault`: boolean | string \| undefined | Gets the current selected channel id |
| `getChannelIds` | `guildId`: string | string[] | Gets all channel ids |
| `getCurrentlySelectedChannelId` | `guildId`: string | string \| undefined | Gets the current selected channel id |
| `getDebugInfo` | | [`DebugInfo`](#DebugInfo) | Gets some information useful for debugging the store |
| `getDMFromUserId` | <Required /> `userId`: string | string \| undefined | Gets the DM channel id by its user id |
| `getDMUserIds` | | string[] | Gets all DM channel ids |
| `getGuildChannelsVersion` | <Required /> `guildId`: string | number | Gets the channel version by guild id |
Expand All @@ -27,6 +28,7 @@ import RequiredNotice from "@site/src/components/RequiredNotice.mdx";
| `getLastSelectedChannels` | <Required /> `guildId`: string | string \| undefined | Gets the last selected channel id by its guild id |
| `getMostRecentSelectedTextChannelId` | `guildId`: string | string \| null | Gets the last selected text channel id by its guild id |
| `getMutableBasicGuildChannelsForGuild` | <Required /> `guildId`: string | Record\<string,&nbsp;<APIReferences.Channel />> | Gets all basic channels by its guild id |
| `getMutableDMsByUserIds` | | Record\<string,&nbsp;string> | Gets all DM channel ids mapped by its user id |
| `getMutableGuildChannelsForGuild` | <Required /> `guildId`: string | Record\<string,&nbsp;<APIReferences.Channel />> | Gets all channels by its guild id |
| `getMutablePrivateChannels` | | Record\<string,&nbsp;<APIReferences.Channel />> | Gets all DM channels |
| `getPrivateChannelsVersion` | | number | Gets the DM channel version |
Expand All @@ -37,6 +39,14 @@ import RequiredNotice from "@site/src/components/RequiredNotice.mdx";

### Types \{#channels-types}

#### `DebugInfo` \{#DebugInfo}

| Name | Type | Description |
| ------------------- | ---------------------------- | ----------------------------------------------------------------------------- |
| `guildSizes` | Record\<number,&nbsp;string> | Array of strings representing a guild id and how many channels that guild has |
| `loadedGuildIds` | string[] | Array of guild ids that have been loaded |
| `pendingGuildLoads` | string[] | Array of guild ids that are scheduled to be loaded |

#### `LastChannelFollowingDestination` \{#LastChannelFollowingDestination}

| Name | Type | Description |
Expand Down
28 changes: 16 additions & 12 deletions docs/plugins/modules/common/stores/guilds.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,22 @@ import RequiredNotice from "@site/src/components/RequiredNotice.mdx";

### Functions

| Name | Parameters | Return Type | Description |
| -------------------------- | ------------------------------ | --------------------------------------------- | ------------------------------------------------------------------- |
| `getCurrentGuild` | | <APIReferences.Guild /> \| undefined | Gets the currently selected guild object |
| `getGuild` | <Required /> `guildId`: string | <APIReferences.Guild /> \| undefined | Gets the guild by its id |
| `getGuildCount` | | number | Gets the number of how many guilds the current user is in |
| `getGuildId` | | string \| null | Gets the id of the currently selected guild |
| `getGuildIds` | | string[] | Gets all guild ids |
| `getGuilds` | | Record\<string,&nbsp;<APIReferences.Guild />> | Gets all guilds |
| `getLastSelectedGuildId` | | string \| null | Gets the last selected guild id |
| `getLastSelectedTimestamp` | <Required /> `guildId`: string | number | Gets the timestamp of when a specific guild was last selected |
| `getState` | | [`State`](#state) | Gets an object containing some information about guild selections |
| `isLoaded` | | boolean | Gets a value indicating whether all initial guilds have been loaded |
| Name | Parameters | Return Type | Description |
| -------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------ | ------------------------------------------------------------------- |
| `getAllGuildsRoles` | | Record\<string,&nbsp;Record\<string,&nbsp;<APIReferences.Role />>> | Gets all roles of all guilds |
| `getCurrentGuild` | | <APIReferences.Guild /> \| undefined | Gets the currently selected guild object |
| `getGeoRestrictedGuilds` | | string[] | Gets all geo restricted guilds |
| `getGuild` | <Required /> `guildId`: string | <APIReferences.Guild /> \| undefined | Gets the guild by its id |
| `getGuildCount` | | number | Gets the number of how many guilds the current user is in |
| `getGuildId` | | string \| null | Gets the id of the currently selected guild |
| `getGuildIds` | | string[] | Gets all guild ids |
| `getGuilds` | | Record\<string,&nbsp;<APIReferences.Guild />> | Gets all guilds |
| `getLastSelectedGuildId` | | string \| null | Gets the last selected guild id |
| `getLastSelectedTimestamp` | <Required /> `guildId`: string | number | Gets the timestamp of when a specific guild was last selected |
| `getRole` | <Required /> `guildId`: string <br /> <Required /> `roleId`: string | <APIReferences.Role /> \| undefined | Gets a role by its id |
| `getRoles` | <Required /> `guildId`: string | Record\<string,&nbsp;<APIReferences.Role />> | Gets all roles of a guild |
| `getState` | | [`State`](#state) | Gets an object containing some information about guild selections |
| `isLoaded` | | boolean | Gets a value indicating whether all initial guilds have been loaded |

### Types \{#guilds-types}

Expand Down
Loading

0 comments on commit 0a09753

Please sign in to comment.