Skip to content

Commit

Permalink
fix: type error
Browse files Browse the repository at this point in the history
Signed-off-by: Innei <i@innei.in>
  • Loading branch information
Innei committed Sep 14, 2024
1 parent b8524ef commit 6d4be02
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
9 changes: 7 additions & 2 deletions src/modules/mx-space/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,10 @@ async function bindEvents(tgBot: Telegraf) {
: `${ctx.from.first_name}(${ctx.from.id})`
ctx.sendMessage(`欢迎新大佬 ${identifier} \n\n${hitokoto}`, {
parse_mode: 'MarkdownV2',
reply_to_message_id: ctx.message.message_id,

reply_parameters: {
message_id: ctx.message.message_id,
},
})
})

Expand Down Expand Up @@ -151,7 +154,9 @@ async function bindCommands(tgBot: Telegraf) {
const result = schema.safeParse({ type, offset: +offset })
if (!result.success) {
ctx.reply(result.error.issues.map((v) => v.message).join('\n'), {
reply_to_message_id: ctx.message.message_id,
reply_parameters: {
message_id: ctx.message.message_id,
},
})
return
}
Expand Down
2 changes: 1 addition & 1 deletion src/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ void app.listen({
host: process.env.SERVER_HOSTNAME ?? '127.0.0.1',
})

app.ready((err: Error) => {
app.ready((err) => {
if (err) {
app.log.error(err)
process.exit(1)
Expand Down

0 comments on commit 6d4be02

Please sign in to comment.