Class UserMustBeInVoiceAttribute
Indicates that this command can only be used while the user is in a voice channel in the same Guild. This precondition automatically applies RequireContextAttribute.
Inheritance
UserMustBeInVoiceAttribute
Inherited Members
Namespace: Discord.Addons.Preconditions
Assembly: Discord.Addons.Preconditions.dll
Syntax
[AttributeUsage(AttributeTargets.Method, AllowMultiple = false, Inherited = false)]
public sealed class UserMustBeInVoiceAttribute : RequireContextAttribute
Constructors
| Improve this Doc View SourceUserMustBeInVoiceAttribute()
Declaration
public UserMustBeInVoiceAttribute()
Methods
| Improve this Doc View SourceCheckPermissionsAsync(ICommandContext, CommandInfo, IServiceProvider)
Declaration
public override async Task<PreconditionResult> CheckPermissionsAsync(ICommandContext context, CommandInfo command, IServiceProvider services)
Parameters
Type | Name | Description |
---|---|---|
ICommandContext | context | |
CommandInfo | command | |
IServiceProvider | services |
Returns
Type | Description |
---|---|
Task<PreconditionResult> |