private static Task OnUserVoiceStateUpdated(SocketUser user, SocketVoiceState before, SocketVoiceState after) { if (before.VoiceChannel != after.VoiceChannel) { Core.Log.Write(Core.Log.Type.USER, $"{user.GetShownName ()} moved from voice channel {before.VoiceChannel.GetPath ()} to {after.VoiceChannel.GetPath ()}"); } else { if (before.IsDeafened != after.IsDeafened) { Core.Log.Write(Core.Log.Type.USER, $"{user.GetShownName()} had deafened toggled: {after.IsDeafened}."); } if (before.IsMuted != after.IsMuted) { Core.Log.Write(Core.Log.Type.USER, $"{user.GetShownName()} had muted toggled: {after.IsMuted}."); } if (before.IsSelfDeafened != after.IsSelfDeafened) { Core.Log.Write(Core.Log.Type.USER, $"{user.GetShownName()} had self-deafened toggled: {after.IsSelfDeafened}."); } if (before.IsSelfMuted != after.IsSelfMuted) { Core.Log.Write(Core.Log.Type.USER, $"{user.GetShownName()} had self-muted toggled: {after.IsSelfMuted}."); } if (before.IsSuppressed != after.IsSuppressed) { Core.Log.Write(Core.Log.Type.USER, $"{user.GetShownName()} had supressed toggled: {after.IsSuppressed}."); } } return(Task.CompletedTask); }
private async Task OnUserBannedFromGuild(SocketUser user, SocketGuild guild) { await SendMessage(guild, _onUserBannedFromGuild, "[USERNAME]", user.GetShownName()); }
private static Task OnUserBanned(SocketUser arg1, SocketGuild arg2) { Core.Log.Write(Core.Log.Type.USER, arg1.GetShownName() + " has been banned from " + arg2.Name); return(Task.CompletedTask); }