public static async Task Send(SocketUserMessage msg) { var ach_name = msg.Content.Remove(0, 14).Split('^')[0]; var ach_desc = msg.Content.Split('^')[1]; await WebHook.SendEmbedHook("Achievement Unlocked", msg.Author.GetAvatarUrl(), msg.Author.Username, 16776960, $"{Format.Bold(ach_name)}\n{Format.Italics(ach_desc)}"); }
public static async Task Send(SocketUserMessage msg) { var username = msg.Author.Username; if (username.Contains("§")) { username = username.Split('§').LastOrDefault()?.Remove(0, 1); } await WebHook.SendEmbedHook("SkyFactory", msg.Author.GetAvatarUrl(), username, 16711680, "**left the server!**"); Stats.StopPlaying(username); await PlayerCount.DelPlayer(); }
private async Task HandleVoiceStateAsync(SocketUser arg1, SocketVoiceState arg2, SocketVoiceState arg3) { var action = string.Empty; if (arg2.VoiceChannel == null && arg3.VoiceChannel.Id == 450348064994230273) { action = "joined"; } if (arg2.VoiceChannel?.Id == 450348064994230273 && arg3.VoiceChannel == null) { action = "left"; } if (action == string.Empty) { return; } await WebHook.SendEmbedHook("SkyFactory", arg1.GetAvatarUrl(), arg1.Username, 6554197, $"{action} voice channel."); }