import { DataSource } from 'typeorm';
import { CustomEmojiEntity } from '../../../entities';
import { DeleteCustomEmojiCommand } from '../../types';

export async function handleDeleteCustomEmoji(command: DeleteCustomEmojiCommand, dataSource: DataSource): Promise<void> {
  await dataSource.getRepository(CustomEmojiEntity).delete({ id: command.payload.emojiId });
}
