public static void Bind(DiscordSocketClient client) { client.AddOnFirstReady(() => { Client_Ready(client); return(Task.CompletedTask); }); }
public static void Bind(DiscordSocketClient client) { OnMute += (a, b) => MuteWatcher_OnMute(client, a, b); OnUnmute += mute => MuteWatcher_OnUnmute(client, mute); client.AddOnFirstReady(() => Client_Ready(client)); client.UserJoined += VerifyMute; client.GuildMemberUpdated += (oldUser, newUser) => Client_GuildMemberUpdated(client, oldUser, newUser); }
public static void Bind(DiscordSocketClient client) { CacheProvider = new RoleCacheProvider(client); client.MessageReceived += a => Client_MessageReceived(client, a); client.GuildMemberUpdated += (a, b) => Client_GuildMemberUpdated(client, a, b); client.RoleUpdated += Client_RoleUpdated; client.AddOnFirstReady(() => Client_Ready(client)); Score.OnUpdate += (a, b) => Score_OnUpdate(client, a, b); }
/// <summary> /// Attaches event handlers to the client. /// </summary> public static void Bind(DiscordSocketClient client) { client.AddOnFirstReady(() => { StarboardWatcherConfigurator.GeneralStarboard(client); StarboardWatcherConfigurator.StaffVoteStarboard(client); StarboardWatcherConfigurator.SuggestionStarboard(client); return(Task.CompletedTask); }); }
public static async Task <DiscordSocketClient> GetClient() { var client = new DiscordSocketClient(new DiscordSocketConfig { MessageCacheSize = 50, AlwaysDownloadUsers = true }); client.Log += Log; client.AddOnFirstReady(() => Ready(client)); await client.LoginAsync(TokenType.Bot, Passwords.DiscordToken); await client.StartAsync(); await client.SetStatusAsync(UserStatus.Online); return(client); }
public static void Bind(DiscordSocketClient client) { client.AddOnFirstReady(() => Client_Ready(client)); }