Method UseTwoFactorAsync
- Namespace
- DisCatSharp.Extensions.TwoFactorCommands
- Assembly
- DisCatSharp.Extensions.TwoFactorCommands.dll
UseTwoFactorAsync(DiscordShardedClient, TwoFactorConfiguration?)
Enables TwoFactor module on all shards in this DiscordShardedClient.
public static Task<IReadOnlyDictionary<int, TwoFactorExtension>> UseTwoFactorAsync(this DiscordShardedClient client, TwoFactorConfiguration? cfg = null)
Parameters
client
DiscordShardedClientClient to enable TwoFactor for.
cfg
TwoFactorConfigurationTwoFactor configuration to use.
Returns
- Task<IReadOnlyDictionary<int, TwoFactorExtension>>
A dictionary of created TwoFactorExtension, indexed by shard id.