Class GuildSponsorBlock
- Namespace
- Nyra
- Assembly
- Nyra.dll
The SponsorBlock settings of a guild connection.
public sealed class GuildSponsorBlock
- Inheritance
-
GuildSponsorBlock
- Inherited Members
Methods
ClearAsync(CancellationToken)
Clears the current track's SponsorBlock segments, the settings survive it.
public Task ClearAsync(CancellationToken cancellationToken = default)
Parameters
cancellationTokenCancellationTokenA token to cancel the operation.
Returns
- Task
A task that completes when the state was cleared.
Remarks
NodeLink only.
Exceptions
- NotSupportedException
The node is not NodeLink.
GetAsync(CancellationToken)
Reads the SponsorBlock state, enabled categories, action types, the current track's segments and the skip margin.
public Task<SponsorBlockState> GetAsync(CancellationToken cancellationToken = default)
Parameters
cancellationTokenCancellationTokenA token to cancel the operation.
Returns
- Task<SponsorBlockState>
The SponsorBlock state of the connection.
Remarks
NodeLink only.
Exceptions
- NotSupportedException
The node is not NodeLink.
SetAsync(SponsorBlockSettings, CancellationToken)
Changes the SponsorBlock settings, members left null keep their current value.
public Task<SponsorBlockState> SetAsync(SponsorBlockSettings settings, CancellationToken cancellationToken = default)
Parameters
settingsSponsorBlockSettingsThe settings to apply.
cancellationTokenCancellationTokenA token to cancel the operation.
Returns
- Task<SponsorBlockState>
The state as the server reports it now.
Remarks
NodeLink only.
Exceptions
- NotSupportedException
The node is not NodeLink.
SetSegmentsAsync(IReadOnlyList<SponsorBlockSegment>, CancellationToken)
Replaces the current track's SponsorBlock segments with the given ones.
public Task<SponsorBlockState> SetSegmentsAsync(IReadOnlyList<SponsorBlockSegment> segments, CancellationToken cancellationToken = default)
Parameters
segmentsIReadOnlyList<SponsorBlockSegment>The segments to submit.
cancellationTokenCancellationTokenA token to cancel the operation.
Returns
- Task<SponsorBlockState>
The state as the server reports it now.
Remarks
NodeLink only.
Exceptions
- NotSupportedException
The node is not NodeLink.