コード例 #1
0
        public void Can_Get_MessageCount_Check()
        {
            File.Delete(Constants.MessageCountPath);
            MessageCountController.MessageRecord(1);
            string count = MessageCountController.GetMessages(1);

            Assert.AreEqual($"<@!1> has posted 1 messages", count);
            File.Delete(Constants.MessageCountPath);
        }
コード例 #2
0
        public async Task Messagecount()
        {
            var msg       = Context.Message;
            var discordId = msg.Author.Id;

            string result = MessageCountController.GetMessages(discordId);

            await ReplyAsync(result);
        }