示例#1
0
        public async Task OutputCurrentTimeForUserAsync(MiunieUser user, MiunieChannel channel)
        {
            if (!user.UtcTimeOffset.HasValue)
            {
                await _messages.SendMessageAsync(channel, PhraseKey.TIME_NO_TIMEZONE_INFO, user.Name);

                return;
            }

            var targetDateTime = _dateTime.UtcNow + user.UtcTimeOffset.Value;
            await _messages.SendMessageAsync(channel, PhraseKey.TIME_TIMEZONE_INFO, user.Name, targetDateTime);
        }
示例#2
0
 public async Task ShowRepositoryAsync(MiunieChannel c)
 => await _discordMessages.SendMessageAsync(c, PhraseKey.SHOW_REMOTE_REPO);
示例#3
0
 public async Task ShowCzkStatus(MiunieChannel channel)
 {
     var data = FetchUpdatedData();
     await _discordMessages.SendMessageAsync(channel, data);
 }
示例#4
0
 public async Task SendRandomYesNoAnswer(MiunieChannel channel)
 {
     await _messages.SendMessageAsync(channel, PhraseKey.YES_NO_MAYBE);
 }
示例#5
0
 public async Task ShowProfileAsync(MiunieUser user, MiunieChannel c)
 => await _discordMessages.SendMessageAsync(c, user);
示例#6
0
 public async Task YesNoMaybeAnswer(MiunieChannel targetChannel) =>
 await _discordMessages.SendMessageAsync(targetChannel, PhraseKey.YES_NO_MAYBE);
示例#7
0
        public async Task ListDirectoryAsync(MiunieChannel c, MiunieUser u)
        {
            var dl = await _directoryProvider.OfAsync(u);

            await _messages.SendMessageAsync(c, dl);
        }
示例#8
0
 public async Task RemoveUserData(MiunieUser user, MiunieChannel channel)
 {
     _users.RemoveUser(user);
     await _messages.SendMessageAsync(channel, PhraseKey.USER_PRIVACY_DATA_REMOVED, user.Name);
 }