示例#1
0
        public async Task CatAsync(params IUser[] users)
        {
            var text = users != null && users.Length > 0
                ? $"{Context.Message.Author.Username} tosses a pissed of cat at {users[0].Username}\n{users[0].Username} runs around in panic, screaming for sweet sweet mercy"
                : $"{Context.Message.Author.Username} gets jumped by a swarm of angry cats! Oh no! :o";

            var stream = await RandomCatPictureService.GetCatPictureAsync();

            stream.Seek(0, SeekOrigin.Begin);
            await Context.Channel.SendFileAsync(stream, "cat.png", text);
        }
示例#2
0
 internal PublicModule(RandomCatPictureService pictureService, HexingService hexingService, DiscordSocketClient discord)
 {
     RandomCatPictureService = pictureService;
     HexingService           = hexingService;
     Discord = discord;
 }