示例#1
0
        public async Task Del([Remainder] string id)
        {
            if (PersistentData.DoesExist(id))
            {
                PersistentData.DeleteMail(id);
                Context.Channel.SendMessageAsync(":thumbsup: The Message Has Been Deleted.");
            }
            else
            {
                string message       = "'Did you Make sure to copy the user id correctly?'";
                var    DirectMessage = await Context.User.GetOrCreateDMChannelAsync();

                await DirectMessage.SendMessageAsync(message);
            }
        }
示例#2
0
        public async Task Send([Remainder] string message)
        {
            string username = Context.User.Username;

            if (PersistentData.GetCount() < Max_Limit)
            {
                if (PersistentData.DoesExist(username))
                {
                    PersistentData.DeleteMail(username);
                    PersistentData.DataStore(username, message);
                    Context.Channel.SendMessageAsync(":thumbsup: Your Message was successfully replaced");
                }
                else
                {
                    PersistentData.DataStore(username, message);
                    Context.Channel.SendMessageAsync(":thumbsup: Your Message has been successfully sent");
                }
            }
            else
            {
                Context.Channel.SendMessageAsync(":thumbsdown: Sorry Mailing List Limit Has Been Reached,\nSpace will be created once the admin has cleared messages");
            }
        }