Пример #1
0
        public async Task SendMessage(MiunieChannel mc, MiunieGuild mg)
        {
            var channel = await _discordClient.GetChannelAsync(mc.ChannelId);

            await channel.SendMessageAsync(embed : mg.ToEmbed(_lang));
        }
Пример #2
0
        public async Task SendMessage(string message, MiunieChannel mc)
        {
            var channel = await _discordClient.GetChannelAsync(mc.ChannelId);

            await channel.SendMessageAsync(message);
        }
Пример #3
0
 public async Task SendMessageAsync(MiunieChannel mc, CurrencyConversionResult ccr)
 {
     var channel = _discord.Client.GetChannel(mc.ChannelId) as SocketTextChannel;
     var result  = $"{ccr.FromValue} {ccr.FromCode} = {ccr.ToValue} {ccr.ToCode}";
     await channel.SendMessageAsync(result);
 }
Пример #4
0
        public async Task SendMessageAsync(MiunieChannel mc, MiunieUser mu)
        {
            var channel = await _discord.Client.GetChannelAsync(mc.ChannelId);

            await channel.SendMessageAsync(embed : mu.ToEmbed(_lang));
        }
Пример #5
0
 public async Task SendMessageAsync(MiunieChannel mc, IEnumerable <CurrencyData> tc)
 {
     var channel = _discord.Client.GetChannel(mc.ChannelId) as SocketTextChannel;
     var result  = string.Join("\n", tc.Select(c => $"{c.Amount} {c.Code} = {c.CzechCrowns} CZK"));
     await channel.SendMessageAsync(result);
 }
Пример #6
0
 public async Task SendMessageAsync(MiunieChannel mc, DirectoryListing dl)
 {
     var channel = _discord.Client.GetChannel(mc.ChannelId) as SocketTextChannel;
     var result  = string.Join("\n", dl.Result.Select(s => $":file_folder: {s}"));
     await channel.SendMessageAsync(result);
 }
Пример #7
0
 public async Task SendMessageAsync(MiunieChannel mc, MiunieGuild mg)
 {
     var channel = _discord.Client.GetChannel(mc.ChannelId) as SocketTextChannel;
     await channel.SendMessageAsync(embed : mg.ToEmbed(_lang));
 }
Пример #8
0
 public async Task SendMessageAsync(MiunieChannel mc, PhraseKey phraseKey, params object[] parameters)
 {
     var channel = _discord.Client.GetChannel(mc.ChannelId) as SocketTextChannel;
     var msg     = _lang.GetPhrase(phraseKey.ToString(), parameters);
     await channel.SendMessageAsync(msg);
 }
Пример #9
0
        public async Task ListDirectoryAsync(MiunieChannel c, MiunieUser u)
        {
            var dl = await _directoryProvider.OfAsync(u);

            await _messages.SendMessageAsync(c, dl);
        }