Fix: Integration model from GuildIntegration and added INTEGRATION gateway events (#2168)
* fix integration models; add integration events * fix description on IGUILD for integration * fix typo in integration documentation * fix documentation in connection visibility * removed public identitiers from app and connection * Removed REST endpoints that are not part of the API. * Added documentation for rest integrations * added optional types * Fixed rest interaction field with not being IsSpecified
This commit is contained in:
@@ -415,6 +415,32 @@ namespace Discord.WebSocket
|
||||
|
||||
#endregion
|
||||
|
||||
#region Integrations
|
||||
/// <summary> Fired when an integration is created. </summary>
|
||||
public event Func<IIntegration, Task> IntegrationCreated
|
||||
{
|
||||
add { _integrationCreated.Add(value); }
|
||||
remove { _integrationCreated.Remove(value); }
|
||||
}
|
||||
internal readonly AsyncEvent<Func<IIntegration, Task>> _integrationCreated = new AsyncEvent<Func<IIntegration, Task>>();
|
||||
|
||||
/// <summary> Fired when an integration is updated. </summary>
|
||||
public event Func<IIntegration, Task> IntegrationUpdated
|
||||
{
|
||||
add { _integrationUpdated.Add(value); }
|
||||
remove { _integrationUpdated.Remove(value); }
|
||||
}
|
||||
internal readonly AsyncEvent<Func<IIntegration, Task>> _integrationUpdated = new AsyncEvent<Func<IIntegration, Task>>();
|
||||
|
||||
/// <summary> Fired when an integration is deleted. </summary>
|
||||
public event Func<IGuild, ulong, Optional<ulong>, Task> IntegrationDeleted
|
||||
{
|
||||
add { _integrationDeleted.Add(value); }
|
||||
remove { _integrationDeleted.Remove(value); }
|
||||
}
|
||||
internal readonly AsyncEvent<Func<IGuild, ulong, Optional<ulong>, Task>> _integrationDeleted = new AsyncEvent<Func<IGuild, ulong, Optional<ulong>, Task>>();
|
||||
#endregion
|
||||
|
||||
#region Users
|
||||
/// <summary> Fired when a user joins a guild. </summary>
|
||||
public event Func<SocketGuildUser, Task> UserJoined
|
||||
|
||||
Reference in New Issue
Block a user