Exemple #1
0
        private async Task UpdateChannelAsync(string updateChannel)
        {
            if (!(_client.GetChannel(Convert.ToUInt64(updateChannel)) is ITextChannel channel))
            {
                return;
            }
            try
            {
                var embeds = new List <Embed>
                {
                    //SourceServerStatusService.JustJumpEmbed,
                    // SourceServerStatusService.HightowerEmbed,
                    await SourceServerStatusService.GetMinecraftEmbedAsync(),
                    // SourceServerStatusService.JumpAcademyEmbed
                };

                await DeleteAllMessagesAsync(channel);

                foreach (var embed in embeds)
                {
                    await channel.SendMessageAsync(embed : embed);
                }
            }
            catch (Exception e)
            {
                await channel.SendMessageAsync(embed : Logger.LogException(e));
            }
        }
Exemple #2
0
        public async Task MinecraftAsync()
        {
            var builder = await SourceServerStatusService.GetMinecraftEmbedAsync();

            await ReplyEmbedAsync(builder);
        }