private async Task MainAsync() { await ApiAccess.EnsureLoggedIn(); commandsProcessor = new CommandsProcessor(client); await commandsProcessor.Initialize(); ChannelFilters.Apply(commandsProcessor); NewcomerHandler.Initialize(client); client.Ready += ClientReadyAsync; client.Disconnected += Disconnected; await EnableRoleManager(); await client.LoginAsync(TokenType.Bot, token); await client.StartAsync(); await client.SetGameAsync("A Chatty Township Tale"); AccountModule.EnsureLoaded(); await Task.Delay(-1); }
Task ClientReadyAsync() { Console.WriteLine("Client Ready"); ChannelFilters.Apply(commandsProcessor); return(Task.CompletedTask); }
/// <summary> /// Determines whether the specified /// <see cref="ChannelFilters"/> is equal to the current /// <see cref="ChannelDetail"/>. /// </summary> /// <param name="other"> /// The <see cref="ChannelDetail"/> to compare with the current /// <see cref="ChannelDetail"/>. /// </param> /// <returns> /// <c>true</c> if the specified <see cref="ChannelDetail"/> is /// equal to the current <see cref="ChannelDetail"/>; otherwise, /// <c>false</c>. /// </returns> public bool Equals(ChannelFilters other) { return(other != null && object.Equals(this.OnlyManaged, other.OnlyManaged) && EnumerableUtils.NullTolerantSequenceEqual(this.CalendarIds, other.CalendarIds)); }
/// <summary> /// Determines whether the specified /// <see cref="ChannelFilters"/> is equal to the current /// <see cref="ChannelDetail"/>. /// </summary> /// <param name="other"> /// The <see cref="ChannelDetail"/> to compare with the current /// <see cref="ChannelDetail"/>. /// </param> /// <returns> /// <c>true</c> if the specified <see cref="ChannelDetail"/> is /// equal to the current <see cref="ChannelDetail"/>; otherwise, /// <c>false</c>. /// </returns> public bool Equals(ChannelFilters other) { return other != null && object.Equals(this.OnlyManaged, other.OnlyManaged) && EnumerableUtils.NullTolerantSequenceEqual(this.CalendarIds, other.CalendarIds); }