UNPKG

@darkwolf/telegram-bot.lazy.cjs

Version:
20 lines (16 loc) 531 B
const errors = require('./') class ChatMigratedError extends errors.Error { constructor(id, migrateToChatId) { super(`Chat migrated: '${id}'. Migrated to chat: '${migrateToChatId}'.`, ChatMigratedError.code) this .setName(ChatMigratedError.name) .setMigrateToChatId(migrateToChatId) } setMigrateToChatId(id) { this.migrateToChatId = id return this } } ChatMigratedError.name = 'ChatMigratedError' ChatMigratedError.code = 'chat-migrated' module.exports = ChatMigratedError