Ejemplo n.º 1
0
        public static async Task PerformAsync(SocketCommandContext context, string channelName, string message, bool reply, DataBase db)
        {
            var candidateGuilds = GuildList(context);

            switch (candidateGuilds.Count())
            {
            case 0:
                await context.Channel.SendMessageAsync("It doesn't look like you belong to any servers where Voltaire is installed. Please add Voltaire to your desired server.");

                break;

            case 1:
                await SendToGuild.LookupAndSendAsync(candidateGuilds.First(), context, channelName, message, reply, db);

                break;

            default:
                await context.Channel.SendMessageAsync("It looks like you belong to multiple servers where Voltaire is installed. Please specify your server using the following command: `send_server (server_name) (channel_name) (message)` ex: `send_server \"l33t g4amerz\" some-channel you guys suck`");

                break;
            }
        }
Ejemplo n.º 2
0
        public static async Task PerformAsync(ShardedCommandContext context, string channelName, string message, bool reply, DataBase db)
        {
            var candidateGuilds = GuildList(context);

            switch (candidateGuilds.Count())
            {
            case 0:
                await SendErrorWithDeleteReaction(context, "It doesn't look like you belong to any servers where Voltaire is installed. Please add Voltaire to your desired server.");

                break;

            case 1:
                await SendToGuild.LookupAndSendAsync(candidateGuilds.First(), context, channelName, message, reply, db);

                break;

            default:
                var view = Views.Info.MultipleGuildSendResponse.Response(context, candidateGuilds, message);
                await SendErrorWithDeleteReaction(context, view.Item1, view.Item2);

                break;
            }
        }