2022-12-16 13:48:39 +01:00
|
|
|
import { TransformPipe } from '@discord-nestjs/common';
|
|
|
|
|
2022-12-17 17:56:55 +01:00
|
|
|
import { Command, DiscordCommand, UsePipes } from '@discord-nestjs/core';
|
2022-12-16 13:48:39 +01:00
|
|
|
import { EmbedBuilder } from '@discordjs/builders';
|
2022-12-17 17:56:55 +01:00
|
|
|
import { CommandInteraction } from 'discord.js';
|
2022-12-16 14:15:32 +01:00
|
|
|
import { DefaultJellyfinColor } from 'src/types/colors';
|
2022-12-17 17:56:55 +01:00
|
|
|
import { GenericCustomReply } from '../models/generic-try-handler';
|
2022-12-16 13:48:39 +01:00
|
|
|
|
|
|
|
@Command({
|
|
|
|
name: 'help',
|
2022-12-16 14:15:32 +01:00
|
|
|
description: 'Get help if you're having problems with this bot',
|
2022-12-16 13:48:39 +01:00
|
|
|
})
|
|
|
|
@UsePipes(TransformPipe)
|
2022-12-17 17:56:55 +01:00
|
|
|
export class HelpCommand implements DiscordCommand {
|
|
|
|
handler(commandInteraction: CommandInteraction): GenericCustomReply {
|
2022-12-16 13:48:39 +01:00
|
|
|
return {
|
|
|
|
embeds: [
|
|
|
|
new EmbedBuilder()
|
|
|
|
.setAuthor({
|
|
|
|
name: 'Jellyfin Discord Bot',
|
|
|
|
iconURL:
|
|
|
|
'https://github.com/walkxcode/dashboard-icons/blob/main/png/jellyfin.png?raw=true',
|
|
|
|
url: 'https://github.com/manuel-rw/jellyfin-discord-music-bot',
|
|
|
|
})
|
2022-12-16 14:15:32 +01:00
|
|
|
.setColor(DefaultJellyfinColor)
|
2022-12-16 13:48:39 +01:00
|
|
|
.setTitle('Help Information')
|
|
|
|
.setDescription(
|
|
|
|
'Jellyfin Discord Music bot is an easy way to broadcast your music collection to a Discord voicechannel.',
|
|
|
|
)
|
|
|
|
.addFields([
|
|
|
|
{
|
|
|
|
name: 'Report an issue',
|
|
|
|
value:
|
|
|
|
'https://github.com/manuel-rw/jellyfin-discord-music-bot/issues/new/choose',
|
|
|
|
inline: true,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: 'Source code',
|
|
|
|
value: 'https://github.com/manuel-rw/jellyfin-discord-music-bot',
|
|
|
|
inline: true,
|
|
|
|
},
|
|
|
|
])
|
|
|
|
.toJSON(),
|
|
|
|
],
|
|
|
|
};
|
|
|
|
}
|
|
|
|
}
|