mirror of
https://github.com/informaticker/discord-jellyfin-bot.git
synced 2024-11-25 11:01:56 +01:00
46 lines
1.7 KiB
TypeScript
46 lines
1.7 KiB
TypeScript
import { TransformPipe } from '@discord-nestjs/common';
|
|
|
|
import { Command, DiscordCommand, UsePipes } from '@discord-nestjs/core';
|
|
import { CommandInteraction } from 'discord.js';
|
|
import { DiscordMessageService } from '../clients/discord/discord.message.service';
|
|
import { GenericCustomReply } from '../models/generic-try-handler';
|
|
|
|
@Command({
|
|
name: 'help',
|
|
description: 'Get help if you're having problems with this bot',
|
|
})
|
|
@UsePipes(TransformPipe)
|
|
export class HelpCommand implements DiscordCommand {
|
|
constructor(private readonly discordMessageService: DiscordMessageService) {}
|
|
|
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
handler(commandInteraction: CommandInteraction): GenericCustomReply {
|
|
return {
|
|
embeds: [
|
|
this.discordMessageService.buildMessage({
|
|
title: 'Jellyfin Discord Bot',
|
|
description:
|
|
'Jellyfin Discord Bot is an open source and self-hosted Discord bot, that integrates with your Jellyfin Media server and enables you to playback music from your libraries. You can use the Discord Slash Commands to invoke bot commands.',
|
|
authorUrl: 'https://github.com/manuel-rw/jellyfin-discord-music-bot',
|
|
mixin(embedBuilder) {
|
|
return embedBuilder.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,
|
|
},
|
|
]);
|
|
},
|
|
}),
|
|
],
|
|
};
|
|
}
|
|
}
|