/// <summary> /// Creates a new instance of <see cref="InteractivityService"/>. /// </summary> /// <param name="client">Your instance of <see cref="BaseSocketClient"/>.</param> /// <param name="config">The configuration to use. If none is provided <see cref="InteractivityConfig.Default"/> will be used.</param> public InteractivityService(BaseSocketClient client, InteractivityConfig config = null) { Client = client ?? throw new ArgumentNullException(nameof(client)); config ??= InteractivityConfig.Default; RunOnGateway = config.RunOnGateway; DefaultTimeout = config.DefaultTimeout; if (DefaultTimeout <= TimeSpan.Zero) { throw new Exception("Timespan cannot be negative or zero"); } }
/// <summary> /// Creates a new instance of <see cref="InteractivityService"/>. /// </summary> /// <param name="client">Your instance of <see cref="DiscordShardedClient"/>.</param> /// <param name="config">The configuration to use.</param> public InteractivityService(DiscordShardedClient client, InteractivityConfig config = null) : this((BaseSocketClient)client, config) { }