Browse Source

Update v2->v3 guide and index page (#2039)

* Update v2->v3 guide and index

* Fix format on save fail

* Update index.md

* Update discord widget id

* Fix formatting
tags/3.2.0
Quin Lynch GitHub 3 years ago
parent
commit
c1641f12fc
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 23 additions and 16 deletions
  1. +13
    -8
      docs/guides/v2_v3_guide/v2_to_v3_guide.md
  2. +10
    -8
      docs/index.md

+ 13
- 8
docs/guides/v2_v3_guide/v2_to_v3_guide.md View File

@@ -31,15 +31,15 @@ var config = new DiscordSocketConfig()
_client = new DiscordSocketClient(config); _client = new DiscordSocketClient(config);


``` ```

#### Common intents: #### Common intents:


- AllUnprivileged: This is a group of most common intents, that do NOT require any [developer portal] intents to be enabled. - AllUnprivileged: This is a group of most common intents, that do NOT require any [developer portal] intents to be enabled.
This includes intents that receive messages such as: `GatewayIntents.GuildMessages, GatewayIntents.DirectMessages`
This includes intents that receive messages such as: `GatewayIntents.GuildMessages, GatewayIntents.DirectMessages`
- GuildMembers: An intent disabled by default, as you need to enable it in the [developer portal]. - GuildMembers: An intent disabled by default, as you need to enable it in the [developer portal].
- GuildPresences: Also disabled by default, this intent together with `GuildMembers` are the only intents not included in `AllUnprivileged`. - GuildPresences: Also disabled by default, this intent together with `GuildMembers` are the only intents not included in `AllUnprivileged`.
- All: All intents, it is ill adviced to use this without care, as it *can* cause a memory leak from presence.
The library will give responsive warnings if you specify unnecessary intents.

- All: All intents, it is ill adviced to use this without care, as it _can_ cause a memory leak from presence.
The library will give responsive warnings if you specify unnecessary intents.


> [!NOTE] > [!NOTE]
> All gateway intents, their Discord API counterpart and their enum value are listed > All gateway intents, their Discord API counterpart and their enum value are listed
@@ -62,7 +62,12 @@ GatewayIntents = GatewayIntents.AllUnprivileged | GatewayIntents.GuildMembers |


[developer portal]: https://discord.com/developers/ [developer portal]: https://discord.com/developers/


### ReactionAdded Event
### UserLeft event

UserLeft has been changed to have the `SocketUser` and `SocketGuild` parameters instead of a `SocketGuildUser` parameter.
Because of this, guild-only user data cannot be retrieved from this user anymore, as this user is not part of the guild.

### ReactionAdded event


The reaction added event has been changed to have both parameters cacheable. The reaction added event has been changed to have both parameters cacheable.
This allows you to download the channel and message if they aren't cached instead of them being null. This allows you to download the channel and message if they aren't cached instead of them being null.
@@ -78,8 +83,8 @@ There is a new event called `PresenceUpdated` that is called when a user's prese
instead of `GuildMemberUpdated` or `UserUpdated`. instead of `GuildMemberUpdated` or `UserUpdated`.
If your code relied on these events to get presence data then you need to update it to work with the new event. If your code relied on these events to get presence data then you need to update it to work with the new event.


## Migrating your commands to slash command
## Migrating your commands to application commands


The new InteractionService was designed to act like the previous service for text-based commands.
The new interaction service was designed to act like the previous service for text-based commands.
Your pre-existing code will continue to work, but you will need to migrate your modules and response functions to use the new Your pre-existing code will continue to work, but you will need to migrate your modules and response functions to use the new
InteractionService methods. Docs on this can be found in the Guides section.
interaction service methods. Documentation on this can be found in the [Guides](xref:Guides.IntFw.Intro).

+ 10
- 8
docs/index.md View File

@@ -11,7 +11,7 @@ title: Home
[![NuGet](https://img.shields.io/nuget/vpre/Discord.Net.svg?maxAge=2592000?style=plastic)](https://www.nuget.org/packages/Discord.Net) [![NuGet](https://img.shields.io/nuget/vpre/Discord.Net.svg?maxAge=2592000?style=plastic)](https://www.nuget.org/packages/Discord.Net)
[![MyGet](https://img.shields.io/myget/discord-net/vpre/Discord.Net.svg)](https://www.myget.org/feed/Packages/discord-net) [![MyGet](https://img.shields.io/myget/discord-net/vpre/Discord.Net.svg)](https://www.myget.org/feed/Packages/discord-net)
[![Build Status](https://dev.azure.com/discord-net/Discord.Net/_apis/build/status/discord-net.Discord.Net?branchName=dev)](https://dev.azure.com/discord-net/Discord.Net/_build/latest?definitionId=1&branchName=dev) [![Build Status](https://dev.azure.com/discord-net/Discord.Net/_apis/build/status/discord-net.Discord.Net?branchName=dev)](https://dev.azure.com/discord-net/Discord.Net/_build/latest?definitionId=1&branchName=dev)
[![Discord](https://discord.com/api/guilds/81384788765712384/widget.png)](https://discord.gg/dnet)
[![Discord](https://discord.com/api/guilds/848176216011046962/widget.png)](https://discord.gg/dnet)


## What is Discord.NET? ## What is Discord.NET?


@@ -23,6 +23,8 @@ interface with the [Discord API](https://discord.com/).
If this is your first time using Discord.Net, you should refer to the If this is your first time using Discord.Net, you should refer to the
[Intro](xref:Guides.Introduction) for tutorials. [Intro](xref:Guides.Introduction) for tutorials.


If you're coming from Discord.Net V2, you should refer to the [V2 -> V3](xref:Guides.V2V3Guide) guides.

More experienced users might want to refer to the More experienced users might want to refer to the
[API Documentation](xref:API.Docs) for a breakdown of the individual [API Documentation](xref:API.Docs) for a breakdown of the individual
objects in the library. objects in the library.
@@ -37,22 +39,22 @@ for testing and development to eventually get merged into Discord.NET.


[Installing Discord.NET Labs](xref:Guides.GettingStarted.Installation.Labs) [Installing Discord.NET Labs](xref:Guides.GettingStarted.Installation.Labs)


[Discord.NET Labs]: https://github.com/Discord-Net-Labs/Discord.Net-Labs
[Discord.Net Labs]: https://github.com/Discord-Net-Labs/Discord.Net-Labs


## Questions? ## Questions?


Frequently asked questions are covered in the
FAQ. Read it thoroughly because most common questions are already answered there.
Frequently asked questions are covered in the
FAQ. Read it thoroughly because most common questions are already answered there.


If you still have unanswered questions after reading the [FAQ](xref:FAQ.Basics.GetStarted), further support is available on
If you still have unanswered questions after reading the [FAQ](xref:FAQ.Basics.GetStarted), further support is available on
[Discord](https://discord.gg/dnet). [Discord](https://discord.gg/dnet).


## Commonly used features
## New in V3


#### Interaction Framework #### Interaction Framework


A counterpart to staple command service of Discord.NET, the Interaction Framework implements the same
feature-rich structure to register & handle interactions like Slash commands & buttons.
A counterpart to the well-known command service of Discord.Net, the Interaction Framework implements the same
feature-rich structure to register & handle interactions like application commands & buttons.


- Read about the Interaction Framework - Read about the Interaction Framework
[here](xref:Guides.IntFw.Intro) [here](xref:Guides.IntFw.Intro)


Loading…
Cancel
Save