Example #1
0
File: Tags.cs Project: Phytal/Nayu
        public async Task ListTags()
        {
            var guildAcc = GlobalGuildAccounts.GetGuildAccount(Context.Guild.Id);
            var emb      = TagFunctions.BuildTagListEmbed(guildAcc);

            await SendMessage(Context, emb);
        }
Example #2
0
File: Tags.cs Project: Phytal/Nayu
        public async Task ListTags()
        {
            var userAcc = GlobalUserAccounts.GetUserAccount(Context.User.Id);
            var emb     = TagFunctions.BuildTagListEmbed(userAcc);

            await SendMessage(Context, emb);
        }
Example #3
0
File: Tags.cs Project: Phytal/Nayu
        public async Task RemoveTag(string tagName)
        {
            var guildAcc = GlobalGuildAccounts.GetGuildAccount(Context.Guild.Id);
            var response = TagFunctions.RemoveTag(tagName, guildAcc);
            var embed    = EmbedHandler.CreateEmbed(Context, "Success!", response, EmbedHandler.EmbedMessageType.Success,
                                                    false);

            await SendMessage(Context, embed);
        }
Example #4
0
File: Tags.cs Project: Phytal/Nayu
        public async Task UpdateTag(string tagName, [Remainder] string tagContent)
        {
            var guildAcc = GlobalGuildAccounts.GetGuildAccount(Context.Guild.Id);
            //tagContent.Replace("@everyone", "@\u200beveryone").Replace("@here", "@\u200bhere");
            var response = TagFunctions.UpdateTag(tagName, tagContent, guildAcc);
            var embed    = EmbedHandler.CreateEmbed(Context, "Success!", response, EmbedHandler.EmbedMessageType.Success,
                                                    false);

            await SendMessage(Context, embed);
        }
Example #5
0
File: Tags.cs Project: Phytal/Nayu
        public async Task ShowTag(string tagName)
        {
            if (string.IsNullOrWhiteSpace(tagName))
            {
                var description = "You need to use this with some more input...\n" +
                                  "Try the `n!command tag` command to get more information on how to use this command.";
                var errorEmbed = EmbedHandler.CreateEmbed(Context, "Error!", description,
                                                          EmbedHandler.EmbedMessageType.Exception, false);
                await SendMessage(Context, errorEmbed);

                return;
            }

            var guildAcc = GlobalGuildAccounts.GetGuildAccount(Context.Guild.Id);
            var response = TagFunctions.GetTag(tagName, guildAcc);
            var embed    = EmbedHandler.CreateEmbed(Context, "Success!", response, EmbedHandler.EmbedMessageType.Success,
                                                    false);

            await SendMessage(Context, embed);
        }