public async Task Status([Remainder] string input = null) { using (var database = new GuildDB()) { // log execution CommandMethods.LogExecution(logger, "get status", Context); // indicate that the command is being worked on await Context.Channel.TriggerTypingAsync(); GuildTB gtb = statecollection.GetGuildEntry(Context.Guild, database); StringConverter language = statecollection.GetLanguage(Context.Guild, database, gtb); // make sure that the user has the right permissions if (!PermissionHelper.UserHasPermission(Context.User as SocketGuildUser, PermissionHelper.Admin, database)) { await Context.Channel.SendMessageAsync(language.GetString("command.nopermission")); return; } // get all the data from the database ApplicationTB apptb = statecollection.GetApplicationEntry(Context.Guild, database); SocketTextChannel pc = statecollection.GetPublicChannel(Context.Guild, database, gtb); SocketTextChannel nc = statecollection.GetNotificationChannel(Context.Guild, database, gtb); EmbedBuilder eb = new EmbedBuilder() .WithColor(Color.Gold) .WithTitle($":clipboard: Status information for '{gtb.Name}'"); eb.AddField("Language", gtb.Language); eb.AddField("Public channel", (pc != null ? pc.Mention : "Undefined")); eb.AddField("Notification channel", (nc != null ? nc.Mention : "Undefined")); eb.AddField("Application", (apptb != null ? $"ends on: {apptb.Deadline.ToString("dd MMMM a\\t hh:mm tt UTC")}" : "No active application")); await Context.Channel.SendMessageAsync(statecollection.GetLanguage(Context.Guild, database, gtb).GetString("present"), embed : eb.Build()); } }