Exemplo n.º 1
0
        public async Task BlockTextAsync([Remainder] string regexString)
        {
            try
            {
                Regex.IsMatch("", regexString);
            }
            catch (ArgumentException)
            {
                await ReplyAsync(Properties.Resources.InvalidRegexError);

                return;
            }

            await Db.AddGuildTextBlacklistEntry(Context.Guild.Id, regexString);

            await ReplyAsync(Properties.Resources.GenericSuccess);
        }