예제 #1
0
 public async Task RemoveRule(int id)
 {
     if (_ruleTable.Has(id))
     {
         _ruleTable.Remove(id);
         await ReplyAsync("Rule deleted.");
     }
     else
     {
         throw new System.Exception("Rule doesn't exist.");
     }
 }
예제 #2
0
        public async Task RemoveRule(int id)
        {
            (Context.User as IGuildUser).EnsureStaff();

            if (_ruleTable.Has(id))
            {
                _ruleTable.Remove(id);
                await ReplyAsync("Rule deleted.");
            }
            else
            {
                await ReplyAsync("Rule doesn't exist.");
            }

            await UpdateOriginRuleMessage(Context.Guild);
        }