コード例 #1
0
        public async Task RemoveAsync()
        {
            if (_announcementTimer == null)
            {
                await ReplyAsync("There is currently no scheduled announcement.");

                return;
            }

            await Database.DeleteAnnouncementAsync();

            _announcementTimer.Stop();
            await DeleteAsync();
            await ReplyAsync("Removed the active announcement.");

            await Task.Delay(10000);

            await Context.Client.SetGameAsync(ConfigurationManager.AppSettings["GAME"]);
        }