public async Task FixP5() { RestUserMessage loader = await Context.Channel.SendMessageAsync("Normalizing sprite colors..."); try { foreach (var file in Directory.EnumerateFiles($@"C:\Users\Microjack5\Desktop\Old", "*.png")) { string filename = Path.GetFileName(file); Bitmap bitmap = (Bitmap)System.Drawing.Image.FromFile(file); Bitmap newFile = (Bitmap)MultiplyBitmap(bitmap); newFile.Save($@"C:\Users\Microjack5\Desktop\Fix\{filename}", System.Drawing.Imaging.ImageFormat.Png); } } catch (Exception e) { await Context.Channel.SendMessageAsync("Error encountered. Please see console for details."); Console.WriteLine($"{e}"); await loader.DeleteAsync(); return; } await Context.Channel.SendMessageAsync("Sprite colors returned to normal. See source folder for results."); await loader.DeleteAsync(); Console.WriteLine($">>Normalization command called by {Context.User.Username} in #{Context.Channel.Name}\n"); }
/// <summary> /// The event that takes place when the timeout timer concludes /// </summary> /// <param name="obj"></param> /// <param name="args"></param> private static async void TimeoutConfirmationRequestAsync(object obj, ElapsedEventArgs args) { //remove the message from chat in the case of no response await QuoteConfirmationMessage.DeleteAsync(); //notify user that the quote has time out await SendTimeoutMessageAsync(); //remove the association to the message ResetVariables(); }
private async Task ChooseFaction(Cacheable <IUserMessage, ulong> cache, ISocketMessageChannel channel, SocketReaction reaction) { if (reaction.MessageId != _message.Id || reaction.UserId != _newPlayerId) { return; } Program.RemoveReactionEvent(ChooseFaction); switch (reaction.Emote.Name) { case One: _newPlayerFaction = "Human"; break; case Two: _newPlayerFaction = "Klingon"; break; case Three: _newPlayerFaction = "Vulcan"; break; default: Program.AddReactionEvent(ChooseFaction); break; } await _message.DeleteAsync(); var embed = new EmbedBuilder { Color = Color.Blue, Title = _newPlayerName + ": Choose Your Class" }; embed.AddField("1. Captain", "70 Health\n7 Strength\n10 Defence"); embed.AddField("2. Marksman", "70 Health\n10 Strength\n7 Defence"); embed.AddField("3. Smuggler", "100 Health\n7 Strength\n7 Defence"); _message = await Program.GetGuild(ulong.Parse(Environment.GetEnvironmentVariable("GUILD_ID"))) .GetTextChannel(_channelId) .SendMessageAsync("", false, embed.Build()); await _message.AddReactionAsync(new Emoji(One)); await _message.AddReactionAsync(new Emoji(Two)); await _message.AddReactionAsync(new Emoji(Three)); Program.AddReactionEvent(ChooseClass); }
private async Task RemoveContentCreator(CommandMessage message, ContentCreator.Type type) { ContentCreator?streamer = await ContentCreatorDatabase.Load(message.Author.Id.ToString()); if (streamer != null) { if (streamer.HasOtherStreams(type)) { // Creator has more than one source - clear current and save streamer.RemoveContentInfo(type); await ContentCreatorDatabase.Save(streamer); } else { // Creator only uses current source - delete record await ContentCreatorDatabase.Delete(streamer); } } // Send Embed RestUserMessage response = await message.Channel.SendMessageAsync("Removed Creator Info", messageReference : message.MessageReference); // Delay then delete command and response message await Task.Delay(2000); await response.DeleteAsync(); message.DeleteMessage(); }
public async Task Purge(int messageCount = 10) { if (messageCount > MaxPurgeCount) { await Context.Channel.SendMessageAsync($"You can only delete {MaxPurgeCount} messages at a time!"); return; } try { IEnumerable <IMessage> messages = await Context.Channel.GetMessagesAsync(messageCount).FlattenAsync(); await((SocketTextChannel)Context.Channel).DeleteMessagesAsync(messages); } catch (ArgumentOutOfRangeException) { await Context.Channel.SendMessageAsync("There are not enough messages to delete in this channel with your specified message delete count."); return; } RestUserMessage message = await Context.Channel.SendMessageAsync( $"{messageCount} message were deleted, this message will be deleted in a moment."); await Task.Delay(3000); await message.DeleteAsync(); }
public async Task <bool> RemoveLiveEmbedAsync(string channel) { try { var user = await API.V5.Users.GetUserByNameAsync(channel); string channelID = user.Matches[0].Id; var ee = await API.V5.Channels.GetChannelByIDAsync(channelID); Console.WriteLine($"{Globals.CurrentTime} Monitor {ee.DisplayName} was removed manually."); if (_liveEmbeds.ContainsKey(channelID)) { await Task.Delay(250); RestUserMessage embed = _liveEmbeds[channelID].Item1; if (_client.ConnectionState == ConnectionState.Connected) { await embed.DeleteAsync(); } _liveEmbeds.TryRemove(channelID, out Tuple <RestUserMessage, string, string, int> outResult); Console.WriteLine($"{Globals.CurrentTime} Monitor TryParse OutResult: {outResult}"); return(true); } return(false); } catch (Exception ex) { Console.WriteLine(ex.ToString()); return(false); } }
public async Task CheckForSuggestionChannel(SocketMessage msg) { if (msg.Author.IsBot || msg.Channel.GetType() == typeof(SocketDMChannel) || Global.DevUIDs.Contains(msg.Author.Id)) { return; } SocketGuildUser user = (SocketGuildUser)msg.Author; if (user.GuildPermissions.ManageMessages) { return; } SocketGuildChannel channel = (SocketGuildChannel)msg.Channel; ulong _id = channel.Guild.Id; BsonDocument item = await collection.Find(Builders <BsonDocument> .Filter.Eq("_id", _id)).FirstOrDefaultAsync(); string itemVal = item?.GetValue("suggestionschannel").ToString(); if (itemVal != null) { if (itemVal == msg.Channel.Id.ToString()) { await msg.DeleteAsync(); RestUserMessage message = await msg.Channel.SendMessageAsync("", false, Global.EmbedMessage("Error", $" {msg.Author.Mention} You can't send messages here unless you're " + $"executing the {await Global.DeterminePrefix(new ShardedCommandContext(_client, msg as SocketUserMessage))}suggest command.", false, Discord.Color.Red).Build()); await Task.Delay(5000); await message.DeleteAsync(); } } }
private async Task SendAudioAsync(EduardoContext context, SongInfo song, AudioOutStream discordStream) { audioCts = new CancellationTokenSource(); await ShowCurrentSong(context); await Logger.Log($"Starting playback of {song.Name} in {context.Guild.Name}", LogSeverity.Debug); SongBuffer songBuffer = null; try { songBuffer = new SongBuffer(song.StreamUrl); songBuffer.StartBuffering(audioCts.Token); RestUserMessage message = await context.Channel.SendMessageAsync("Video is buffering, please wait a moment..."); await songBuffer.PrebufferingCompleted.Task; await message.DeleteAsync(); //await Task.WhenAny(Task.Delay(10000), songBuffer.PrebufferingCompleted.Task); if (audioCts.IsCancellationRequested) { return; } int bytesSent = 0; while (true) { byte[] buffer = songBuffer.Read(FrameBytes).ToArray(); if (buffer.Length == 0) { break; } AdjustVolume(buffer, volume); await discordStream.WriteAsync(buffer, 0, buffer.Length, audioCts.Token); bytesSent += buffer.Length; song.CurrentTime = TimeSpan.FromSeconds(bytesSent / (float)FrameBytes / (1000 / Milliseconds)); await(pauseTaskSource?.Task ?? Task.CompletedTask); } } catch (Exception ex) when(!(ex is OperationCanceledException cancelledException) || cancelledException.CancellationToken.IsCancellationRequested) { } finally { await discordStream.FlushAsync(); songBuffer?.Dispose(); } }
internal static async Task Update() { Cancel?.Cancel(); Cancel = new CancellationTokenSource(); try { var New = await Channel.SendMessageAsync(string.Empty, embed : new EmbedBuilder() .WithTitle(Streamer.Queue.IsPlaying ? $"♫ {Streamer.Queue.Playing.Title} ♫" : "Nothing is playing") .WithThumbnailUrl(Streamer.Queue.Playing.ThumbNail) .WithColor(new Color(0xFF5722)) .WithDescription(string.Join("\n", Streamer.Queue.Titles)) .Build(), options : new RequestOptions() { CancelToken = Cancel.Token } ); if (Message != null) { await Message.DeleteAsync(); } Message = New; } catch (Exception Ex) { Logger.Log(Ex); } }
internal static async Task Update(string TTSMessage) { Cancel?.Cancel(); Cancel = new CancellationTokenSource(); try { var New = await Bot.SendTTS(TTSMessage, new EmbedBuilder() .WithTitle(Streamer.Queue.IsPlaying ? $"♫ {Streamer.Queue.Playing.Title} ♫" : "Nothing is playing") .WithUrl(Streamer.Queue.IsPlaying && Streamer.Queue.Playing.Url.StartsWith("http") ? Streamer.Queue.Playing.Url : "https://github.com/amirzaidi/slimmirai") .WithThumbnailUrl(Streamer.Queue.Playing.ThumbNail) .WithColor(new Color(0xFF5722)) .WithDescription(string.Join("\n", Streamer.Queue.Titles)) .Build(), new RequestOptions { CancelToken = Cancel.Token } ); if (Message != null) { await Message.DeleteAsync(); } Message = New; } catch (TaskCanceledException) { } catch (Exception Ex) { Logger.Log(Ex); } }
public static async Task Status_Decor_Exit(SocketGuildUser user, RestUserMessage message) { //Get the account information of the command's target var account = UserInfoClasses.GetAccount(user); // Find the menu session associated with the current user and store it in a variable. var menuSession = Global.MenuIdList.SingleOrDefault(x => x.User.Id == user.Id); var embed = new EmbedBuilder(); var author = new EmbedAuthorBuilder { Name = "Now Loading...", IconUrl = user.GetAvatarUrl() }; embed.WithAuthor(author); //Determine color for embeded message embed.WithColor(EmbedSettings.Get_Profile_Embed_Color(account)); // Attempt deleting the message if it hasn't been deleted by the user yet. try { // Delete the current message from the channel. await message.DeleteAsync(); } catch (Exception ex) { Console.WriteLine(ex); } // If the bot lacks permission to send messages, catch the exception and return. try { // Reassign the menu session's message to a new message generated from the created embed. menuSession.MenuMessage = (RestUserMessage)await message.Channel.SendMessageAsync("", false, embed.Build()); } catch (Exception ex) { Console.WriteLine(ex); return; } // Set the "message" variable to the menu session's message. message = menuSession.MenuMessage; // Edit the menu session according to the current message. menuSession.CurrentMenu = "Status_Decor_Exit"; menuSession.MenuTimer = new Timer() { // Create a timer that expires as a "time out" duration for the user. Interval = MenuConfig.menu.timerDuration, AutoReset = false, Enabled = true }; // Create a new menu in the current channel. await Profile_Settings_Menu.Profile_Settings_Main(menuSession.User, menuSession.MenuMessage); }
public static async Task EndGame(SocketReaction reaction, RestUserMessage socketMsg) { var globalAccount = Global.Client.GetUser(reaction.UserId); var account = GameUserAccounts.GetAccount(globalAccount); account.OctopusFightPlayingStatus = 0; GameUserAccounts.SaveAccounts(); await socketMsg.DeleteAsync(); }
public async Task Remove() { if (t.Enabled) { t.Stop(); } await Message.DeleteAsync(); Reservations.ResponseWaiters.Remove(this); }
public async Task <Task> StartBlackjack(CommandMessage message) { // Only allow one game to be played at a time if (activeGame != null) { RestUserMessage rMessage = await message.Channel.SendMessageAsync("Hand has already been dealt. Please wait, _kupo!_"); await Task.Delay(2000); await rMessage.DeleteAsync(); await message.Channel.DeleteMessageAsync(message.Id); return(Task.CompletedTask); } // New game activeGame = new ActiveGame(message.Author.Id, this.betAmount); // User already won - what luck if (activeGame.UserHandValue == 21) { // Final builder information EmbedBuilder builder = GetEmbedBuilder(true, true); RestUserMessage?bjMessage = await message.Channel.SendMessageAsync(null, false, builder.Build(), messageReference : message.MessageReference); activeGame = null; await Task.Delay(3000); // Stop game _ = Task.Run(async() => await StopBlackjack(bjMessage)); } else { // Initial builder information EmbedBuilder builder = GetEmbedBuilder(); // First deal RestUserMessage?bjMessage = await message.Channel.SendMessageAsync(null, false, builder.Build(), messageReference : message.MessageReference); // Update active game activeGame.MessageId = bjMessage.Id; // Add reacts await bjMessage.AddReactionsAsync(Reactions.ToArray()); // Handle reacts Program.DiscordClient.ReactionAdded += OnReactionAdded; // Stop game after no response _ = Task.Run(async() => await StopBlackjack(bjMessage)); } return(Task.CompletedTask); }
public static void DeleteMessage(RestUserMessage botReply, double minutes = 1) { new Task(async() => { await Task.Delay(Convert.ToInt32(minutes * 60000)); try { await botReply.DeleteAsync(); } catch (Exception) { } }).Start(); }
public async void DailyNuts(CommandMessage message) { // Get user information User user = await UserService.GetUser(message.Author); string userName = message.Author.GetName(); string postBackMessage; if (user.LastDailyNut.HasValue) { // Daily reset at 8AM DateTime dailyReset = DateTime.Now.Date.AddHours(8); // Check if it's too early if (DateTime.Now < dailyReset) { dailyReset = dailyReset.AddDays(-1); } // If the user has already nutted, tell them off if (user.LastDailyNut.Value > dailyReset) { TimeSpan timeToWait = dailyReset.AddDays(1) - DateTime.Now; postBackMessage = $"Greedy {userName}! You can have more Kupo Nuts in {timeToWait.ToLongString()}, _kupo!_"; // Delete command message await message.Channel.DeleteMessageAsync(message.Message); RestUserMessage failedMessage = await message.Channel.SendMessageAsync(postBackMessage); await Task.Delay(10000); await failedMessage.DeleteAsync(); return; } } // Generate random nuts int nutsReceieved = new Random().Next(10, 26); // Save to user user.UpdateTotalKupoNuts(nutsReceieved, true); postBackMessage = string.Format("{0}, please enjoy these {1} Kupo Nuts! _Kupo!_", userName, nutsReceieved); // Delete command message await message.Channel.DeleteMessageAsync(message.Message); // Send message await message.Channel.SendMessageAsync(postBackMessage); }
public async Task SendReplyUnsafe(string message) { await this.Client.LogMessage(LogType.Response, this.Channel, this.Client.GlobalConfig.UserId, message); RestUserMessage msg = await this.Channel.SendMessageAsync(message); if (this.CommandOptions != null && this.CommandOptions.DeleteReply) { await Task.Delay(3000); await msg.DeleteAsync(); } }
private async Task updatePendu(SocketMessage message, string toDisplay) { await penduDisplay.DeleteAsync(); if (toDisplay == null) { penduDisplay = await message.Channel.SendMessageAsync(pendu.display()); } else { penduDisplay = await message.Channel.SendMessageAsync(toDisplay); } }
private async Task updateMorpion(SocketMessage message, string toDisplay) { await morpionDisplay.DeleteAsync(); if (toDisplay == null) { morpionDisplay = await message.Channel.SendMessageAsync(morpion.display()); } else { morpionDisplay = await message.Channel.SendMessageAsync(toDisplay); } }
//removes message after 3 seconds private async void respond(RestUserMessage response) { await Task.Delay(3000); if (response.Channel.GetMessageAsync(response.Id) != null) { //if message is deleted prior, to 3 second time, ignore error, otherwise delete message try { await response.DeleteAsync(); } catch { } } }
public static async void ErrorTimer_Elapsed(object sender, ElapsedEventArgs e, RestUserMessage error_message) { // Attempt deleting the message if it hasn't been deleted by the user yet. // If it has, catch the exception and return. try { // Delete the current message from the channel. await error_message.DeleteAsync(); } catch (Exception ex) { Console.WriteLine(ex); return; } }
public async Task CleanMessages(EduardoContext context, int count) { if (count <= 0) { return; } IEnumerable <IMessage> messagesToDelete = await context.Channel.GetMessagesAsync(count + 1).FlattenAsync(); await((ITextChannel)context.Channel).DeleteMessagesAsync(messagesToDelete); string plural = count > 1 ? "s" : ""; RestUserMessage finishedMessage = await context.Channel.SendMessageAsync($"Successfully cleared {count} message{plural} :ok_hand:"); await Task.Delay(3000); await finishedMessage.DeleteAsync(); }
public async Task DeleteTimeoutAsync(RestUserMessage message) { Thread.Sleep(60000); if (VoteEmbed.TrackingVote.ContainsKey(message.Id)) { VoteEmbed.TrackingVote.Remove(message.Id); } selectEmbed.RemoveSelection(message.Id); try { await message.DeleteAsync(); } catch (Discord.Net.HttpException) { return; } }
public async Task SendReplyUnsafe(string message) { await this.Client.LogMessage(LogType.Response, this.Channel, this.Client.GlobalConfig.UserId, message); if (this.Server.Config.IgnoreEveryone) { message = message.Replace("@everyone", "@-everyone").Replace("@here", "@-here"); } RestUserMessage msg = await this.Channel.SendMessageAsync(message); if (this.CommandOptions != null && this.CommandOptions.DeleteReply) { await Task.Delay(3000); await msg.DeleteAsync(); } }
public static async void ErrorTimer_Elapsed(object sender, ElapsedEventArgs e, RestUserMessage error_message, UserInfoFields account) { // If the user has their auto-delete settings for error messages set to on, attempt deleting the message if it hasn't been deleted by the user yet. // If it has, catch the exception and return. if (account.Auto_Delete_Error_Messages == "On") { try { // Delete the current message from the channel. await error_message.DeleteAsync(); } catch (Exception ex) { Console.WriteLine(ex); return; } } }
private async Task DeleteOld(IChannel chano, RoleSelector rsm) { RestUserMessage sm = null; SocketTextChannel itso = chano as SocketTextChannel; ulong idd = rsm.storemessageid; if (idd > 0) { sm = await itso.GetMessageAsync(idd) as RestUserMessage; if (sm != null) { await sm.DeleteAsync(); } } }
private async Task HandleModify(ISocketMessageChannel currentChannel, IUserMessage?botMessage, string text) { if (botMessage != null) { if (botMessage.Author.Id != Program.DiscordClient.CurrentUser.Id) { RestUserMessage errorMessage = await currentChannel.SendMessageAsync("Given message was not sent by me, I cannot modify that _kupo!_"); await Task.Delay(5000); await errorMessage.DeleteAsync(); return; } await botMessage.ModifyAsync(x => x.Content = text); } }
protected async Task <bool> MoveMessageAsync(IMessageChannel oldChannel, ulong msgId, IMessageChannel newChannel, string footer, bool delOld = true) { if (!(await InitMessage(oldChannel, msgId, new string[] { footer, "React-for-Role" }, false))) { return(false); //finds and sets _msg and _oldEmbed } if (_oldEmbed.Footer != null) { if (_oldEmbed.Footer.Value.Text != "React-for-Role Embed") { EmbedBuilder builder = _oldEmbed.ToEmbedBuilder(); builder.Footer.Text = "React-for-Role Embed"; _newEmbed = builder.Build(); } else { _newEmbed = _oldEmbed; } } RestUserMessage newMsg = await newChannel.SendMessageAsync("", false, _newEmbed) as RestUserMessage; try { IEmote[] emotes = _msg.Reactions.Keys.ToArray(); await newMsg.AddReactionsAsync(emotes); if (delOld) { await _msg.DeleteAsync(); } _msg = newMsg; } catch (Exception e) { await ReplyAsync(e.Message); return(false); } return(true); }
public async Task defaultDance() { List <string> defaultStates = new List <string>(); defaultStates.Add("⠀⠀⠀⠀⣀⣤oof⠀⠀⠀⠀⣿⠿⣶oof⠀⠀⠀⠀⣿⣿⣀oof⠀⠀⠀⣶⣶⣿⠿⠛⣶oof⠤⣀⠛⣿⣿⣿⣿⣿⣿⣭⣿⣤oof⠒⠀⠀⠀⠉⣿⣿⣿⣿⠀⠀⠉⣀oof⠀⠤⣤⣤⣀⣿⣿⣿⣿⣀⠀⠀⣿oof⠀⠀⠛⣿⣿⣿⣿⣿⣿⣿⣭⣶⠉oof⠀⠀⠀⠤⣿⣿⣿⣿⣿⣿⣿oof⠀⠀⠀⣭⣿⣿⣿⠀⣿⣿⣿oof⠀⠀⠀⣉⣿⣿⠿⠀⠿⣿⣿oof⠀⠀⠀⠀⣿⣿⠀⠀⠀⣿⣿⣤oof⠀⠀⠀⣀⣿⣿⠀⠀⠀⣿⣿⣿oof⠀⠀⠀⣿⣿⣿⠀⠀⠀⣿⣿⣿oof⠀⠀⠀⣿⣿⠛⠀⠀⠀⠉⣿⣿oof⠀⠀⠀⠉⣿⠀⠀⠀⠀⠀⠛⣿oof⠀⠀⠀⠀⣿⠀⠀⠀⠀⠀⠀⣿⣿oof⠀⠀⠀⠀⣛⠀⠀⠀⠀⠀⠀⠛⠿⠿⠿oof⠀⠀⠀⠛⠛"); defaultStates.Add("⠀⠀⠀⣀⣶⣀oof⠀⠀⠀⠒⣛⣭oof⠀⠀⠀⣀⠿⣿⣶oof⠀⣤⣿⠤⣭⣿⣿oof⣤⣿⣿⣿⠛⣿⣿⠀⣀oof⠀⣀⠤⣿⣿⣶⣤⣒⣛oof⠉⠀⣀⣿⣿⣿⣿⣭⠉oof⠀⠀⣭⣿⣿⠿⠿⣿oof⠀⣶⣿⣿⠛⠀⣿⣿oof⣤⣿⣿⠉⠤⣿⣿⠿oof⣿⣿⠛⠀⠿⣿⣿oof⣿⣿⣤⠀⣿⣿⠿oof⠀⣿⣿⣶⠀⣿⣿⣶oof⠀⠀⠛⣿⠀⠿⣿⣿oof⠀⠀⠀⣉⣿⠀⣿⣿oof⠀⠶⣶⠿⠛⠀⠉⣿oof⠀⠀⠀⠀⠀⠀⣀⣿oof⠀⠀⠀⠀⠀⣶⣿⠿"); defaultStates.Add("⠀⠀⠀⠀⠀⠀⠀⠀⣤⣿⣿⠶⠀⠀⣀⣀oof⠀⠀⠀⠀⠀⠀⣀⣀⣤⣤⣶⣿⣿⣿⣿⣿⣿oof⠀⠀⣀⣶⣤⣤⠿⠶⠿⠿⠿⣿⣿⣿⣉⣿⣿oof⠿⣉⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠛⣤⣿⣿⣿⣀oof⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠉⣿⣿⣿⣿⣶⣤oof⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣤⣿⣿⣿⣿⠿⣛⣿oof⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿⣿⣿⠛⣿⣿⣿⣿oof⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣶⣿⣿⠿⠀⣿⣿⣿⠛oof⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿⣿⣿⠀⠀⣿⣿⣿oof⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠿⠿⣿⠀⠀⣿⣶oof⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿⠛⠀⠀⣿⣿⣶oof⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠉⣿⣿⠤oof⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠿⣿oof⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿oof⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿⣀oof⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣶⣿"); defaultStates.Add("⠀⠀⣀oof⠀⠿⣿⣿⣀oof⠀⠉⣿⣿⣀oof⠀⠀⠛⣿⣭⣀⣀⣤oof⠀⠀⣿⣿⣿⣿⣿⠛⠿⣶⣀oof⠀⣿⣿⣿⣿⣿⣿⠀⠀⠀⣉⣶oof⠀⠀⠉⣿⣿⣿⣿⣀⠀⠀⣿⠉oof⠀⠀⠀⣿⣿⣿⣿⣿⣿⣿⣿oof⠀⣀⣿⣿⣿⣿⣿⣿⣿⣿⠿oof⠀⣿⣿⣿⠿⠉⣿⣿⣿⣿oof⠀⣿⣿⠿⠀⠀⣿⣿⣿⣿oof⣶⣿⣿⠀⠀⠀⠀⣿⣿⣿oof⠛⣿⣿⣀⠀⠀⠀⣿⣿⣿⣿⣶⣀oof⠀⣿⣿⠉⠀⠀⠀⠉⠉⠉⠛⠛⠿⣿⣶oof⠀⠀⣿⠀⠀⠀⠀⠀⠀⠀⠀⠀⣀⣿oof⠀⠀⣿⣿⠀⠀⠀⠀⠀⠀⠀⠀⠉⠉oof⣀⣶⣿⠛"); defaultStates.Add("⠀⠀⠀⠀⠀⠀⠀⣀⣀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀oof⠀⠀⠀⠀⠀⠀⣿⣿⣿⣤⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣤⣤⣿⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀oof⠀⠀⠀⠀⠀⠀⠉⣿⣿⣿⣶⣿⣿⣿⣶⣶⣤⣶⣶⠶⠛⠉⠉⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀oof⠀⠀⠀⠀⠀⠀⣤⣿⠿⣿⣿⣿⣿⣿⠀⠀⠉⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀oof⠛⣿⣤⣤⣀⣤⠿⠉⠀⠉⣿⣿⣿⣿⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀oof⠀⠉⠉⠉⠉⠉⠀⠀⠀⠀⠉⣿⣿⣿⣀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀oof⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣶⣿⣿⣿⣿⣿⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀oof⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿⣿⣿⣿⣿⣿⣿⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀oof⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿⣿⣿⣿⣿⣿⠛⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀oof⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿⣿⣿⣿⣿⣿⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀oof⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿⣿⣛⣿⣿⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀oof⠀⠀⠀⠀⠀⠀⠀⣶⣿⣿⠛⠿⣿⣿⣿⣶⣤⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀oof⠀⠀⠀⠀⠀⠀⠀⣿⠛⠉⠀⠀⠀⠛⠿⣿⣿⣶⣀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀oof⠀⠀⠀⠀⠀⠀⣿⣀⠀⠀⠀⠀⠀⠀⠀⠀⠉⠛⠿⣶⣤⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀oof⠀⠀⠀⠀⠀⠛⠿⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣀⣿⣿⠿⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀oof⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠛⠉⠉⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀"); defaultStates.Add("⠀⠀⠀⠀⠀⠀⣤⣶⣶oof⠀⠀⠀⠀⠀⠀⣿⣿⣿⣿⣀⣀oof⠀⠀⠀⠀⠀⣀⣶⣿⣿⣿⣿⣿⣿oof⣤⣶⣀⠿⠶⣿⣿⣿⠿⣿⣿⣿⣿oof⠉⠿⣿⣿⠿⠛⠉⠀⣿⣿⣿⣿⣿oof⠀⠀⠉⠀⠀⠀⠀⠀⠀⣿⣿⣿⣿⣤⣤oof⠀⠀⠀⠀⠀⠀⠀⣤⣶⣿⣿⣿⣿⣿⣿oof⠀⠀⠀⠀⠀⣀⣿⣿⣿⣿⣿⠿⣿⣿⣿⣿oof⠀⠀⠀⠀⣀⣿⣿⣿⠿⠉⠀⠀⣿⣿⣿⣿oof⠀⠀⠀⠀⣿⣿⠿⠉⠀⠀⠀⠀⠿⣿⣿⠛oof⠀⠀⠀⠀⠛⣿⣿⣀⠀⠀⠀⠀⠀⣿⣿⣀oof⠀⠀⠀⠀⠀⣿⣿⣿⠀⠀⠀⠀⠀⠿⣿⣿oof⠀⠀⠀⠀⠀⠉⣿⣿⠀⠀⠀⠀⠀⠀⠉⣿oof⠀⠀⠀⠀⠀⠀⠀⣿⠀⠀⠀⠀⠀⠀⣀⣿oof⠀⠀⠀⠀⠀⠀⣀⣿⣿oof⠀⠀⠀⠀⠤⣿⠿⠿⠿"); defaultStates.Add("⠀⠀⠀⠀⣀oof⠀⠀⣶⣿⠿⠀⠀⠀⣀⠀⣤⣤oof⠀⣶⣿⠀⠀⠀⠀⣿⣿⣿⠛⠛⠿⣤⣀oof⣶⣿⣤⣤⣤⣤⣤⣿⣿⣿⣀⣤⣶⣭⣿⣶⣀oof⠉⠉⠉⠛⠛⠿⣿⣿⣿⣿⣿⣿⣿⠛⠛⠿⠿oof⠀⠀⠀⠀⠀⠀⠀⣿⣿⣿⣿⣿⠿oof⠀⠀⠀⠀⠀⠀⠀⠿⣿⣿⣿⣿oof⠀⠀⠀⠀⠀⠀⠀⠀⣭⣿⣿⣿⣿⣿oof⠀⠀⠀⠀⠀⠀⠀⣤⣿⣿⣿⣿⣿⣿oof⠀⠀⠀⠀⠀⠀⠀⣿⣿⣿⣿⣿⣿⠿oof⠀⠀⠀⠀⠀⠀⠀⣿⣿⣿⣿⣿⠿oof⠀⠀⠀⠀⠀⠀⠀⣿⣿⣿⣿⣿oof⠀⠀⠀⠀⠀⠀⠀⠉⣿⣿⣿⣿oof⠀⠀⠀⠀⠀⠀⠀⠀⠉⣿⣿⣿⣿oof⠀⠀⠀⠀⠀⠀⠀⠀⠀⠉⣿⠛⠿⣿⣤oof⠀⠀⠀⠀⠀⠀⠀⠀⠀⣀⣿⠀⠀⠀⣿⣿⣤oof⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿⠀⠀⠀⣶⣿⠛⠉oof⠀⠀⠀⠀⠀⠀⠀⠀⣤⣿⣿⠀⠀⠉oof⠀⠀⠀⠀⠀⠀⠀⠀⠀⠉"); defaultStates.Add("⠀⠀⠀⠀⠀⠀⣶⣿⣶oof⠀⠀⠀⣤⣤⣤⣿⣿⣿oof⠀⠀⣶⣿⣿⣿⣿⣿⣿⣿⣶oof⠀⠀⣿⣿⣿⣿⣿⣿⣿⣿⣿oof⠀⠀⣿⣉⣿⣿⣿⣿⣉⠉⣿⣶oof⠀⠀⣿⣿⣿⣿⣿⣿⣿⣿⠿⣿oof⠀⣤⣿⣿⣿⣿⣿⣿⣿⠿⠀⣿⣶oof⣤⣿⠿⣿⣿⣿⣿⣿⠿⠀⠀⣿⣿⣤oof⠉⠉⠀⣿⣿⣿⣿⣿⠀⠀⠒⠛⠿⠿⠿oof⠀⠀⠀⠉⣿⣿⣿⠀⠀⠀⠀⠀⠀⠉oof⠀⠀⠀⣿⣿⣿⣿⣿⣶oof⠀⠀⠀⠀⣿⠉⠿⣿⣿oof⠀⠀⠀⠀⣿⣤⠀⠛⣿⣿oof⠀⠀⠀⠀⣶⣿⠀⠀⠀⣿⣶oof⠀⠀⠀⠀⠀⠀⠀⠀⠀⣭⣿⣿oof⠀⠀⠀⠀⠀⠀⠀⠀⣤⣿⣿⠉"); defaultStates.Add("⠀⠀⠀⠀⠀⠀⠀⠀⠀⣤⣶oof⠀⠀⠀⠀⠀⣀⣀⠀⣶⣿⣿⠶oof⣶⣿⠿⣿⣿⣿⣿⣿⣿⣿⣿⣤⣤oof⠀⠉⠶⣶⣀⣿⣿⣿⣿⣿⣿⣿⠿⣿⣤⣀oof⠀⠀⠀⣿⣿⠿⠉⣿⣿⣿⣿⣭⠀⠶⠿⠿oof⠀⠀⠛⠛⠿⠀⠀⣿⣿⣿⣉⠿⣿⠶oof⠀⠀⠀⠀⠀⣤⣶⣿⣿⣿⣿⣿oof⠀⠀⠀⠀⠀⣿⣿⣿⣿⣿⣿⣿⠒oof⠀⠀⠀⠀⣀⣿⣿⣿⣿⣿⣿⣿oof⠀⠀⠀⠀⠀⣿⣿⣿⠛⣭⣭⠉oof⠀⠀⠀⠀⠀⣿⣿⣭⣤⣿⠛oof⠀⠀⠀⠀⠀⠛⠿⣿⣿⣿⣭oof⠀⠀⠀⠀⠀⠀⠀⣿⣿⠉⠛⠿⣶⣤oof⠀⠀⠀⠀⠀⠀⣀⣿⠀⠀⣶⣶⠿⠿⠿oof⠀⠀⠀⠀⠀⠀⣿⠛oof⠀⠀⠀⠀⠀⠀⣭⣶"); defaultStates.Add("⠀⠀⠀⠀⠀⠀⠀⠀⠀⣤⣤oof⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿⣿⣿oof⠀⠀⣶⠀⠀⣀⣤⣶⣤⣉⣿⣿⣤⣀oof⠤⣤⣿⣤⣿⠿⠿⣿⣿⣿⣿⣿⣿⣿⣿⣀oof⠀⠛⠿⠀⠀⠀⠀⠉⣿⣿⣿⣿⣿⠉⠛⠿⣿⣤oof⠀⠀⠀⠀⠀⠀⠀⠀⠿⣿⣿⣿⠛⠀⠀⠀⣶⠿oof⠀⠀⠀⠀⠀⠀⠀⠀⣀⣿⣿⣿⣿⣤⠀⣿⠿oof⠀⠀⠀⠀⠀⠀⠀⣶⣿⣿⣿⣿⣿⣿⣿⣿oof⠀⠀⠀⠀⠀⠀⠀⠿⣿⣿⣿⣿⣿⠿⠉⠉oof⠀⠀⠀⠀⠀⠀⠀⠉⣿⣿⣿⣿⠿oof⠀⠀⠀⠀⠀⠀⠀⠀⣿⣿⣿⠉oof⠀⠀⠀⠀⠀⠀⠀⠀⣛⣿⣭⣶⣀oof⠀⠀⠀⠀⠀⠀⠀⠀⣿⣿⣿⣿⣿oof⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿⣿⠉⠛⣿oof⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿⣿⠀⠀⣿⣿oof⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿⣉⠀⣶⠿oof⠀⠀⠀⠀⠀⠀⠀⠀⣶⣿⠿oof⠀⠀⠀⠀⠀⠀⠀⠛⠿⠛"); defaultStates.Add("⠀⠀⠀⣶⣿⣶oof⠀⠀⠀⣿⣿⣿⣀oof⠀⣀⣿⣿⣿⣿⣿⣿oof⣶⣿⠛⣭⣿⣿⣿⣿oof⠛⠛⠛⣿⣿⣿⣿⠿oof⠀⠀⠀⠀⣿⣿⣿oof⠀⠀⣀⣭⣿⣿⣿⣿⣀oof⠀⠤⣿⣿⣿⣿⣿⣿⠉oof⠀⣿⣿⣿⣿⣿⣿⠉oof⣿⣿⣿⣿⣿⣿oof⣿⣿⣶⣿⣿oof⠉⠛⣿⣿⣶⣤oof⠀⠀⠉⠿⣿⣿⣤oof⠀⠀⣀⣤⣿⣿⣿oof⠀⠒⠿⠛⠉⠿⣿oof⠀⠀⠀⠀⠀⣀⣿⣿oof⠀⠀⠀⠀⣶⠿⠿⠛"); RestUserMessage msg = null; int i = 0; foreach (string state in defaultStates) { if (i == 0) { msg = await Context.Channel.SendMessageAsync("```" + state.Replace("oof", Environment.NewLine) + "```"); } else { await msg.ModifyAsync(x => { x.Content = "```" + state.Replace("oof", Environment.NewLine) + "```"; }); } await Task.Delay(1250); i++; } await Context.Message.DeleteAsync(); await msg.DeleteAsync(); }
private async Task SetContentCreator(CommandMessage message, string identifier, ContentCreator.Type type, string?linkId = null) { ContentCreator streamer = await ContentCreatorDatabase.LoadOrCreate(message.Author.Id.ToString()); streamer.DiscordGuildId = message.Guild.Id; streamer.DiscordUserId = message.Author.Id; streamer.GuildNickName = message.Author.GetName(); streamer.SetContentInfo(identifier, type, linkId); await ContentCreatorDatabase.Save(streamer); // Send Embed RestUserMessage response = await message.Channel.SendMessageAsync("Added Stream Info", messageReference : message.MessageReference); // Delay then delete command and response message await Task.Delay(2000); await response.DeleteAsync(); message.DeleteMessage(); }