优化指令
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
Qumolama.d
2022-07-05 01:48:48 +08:00
parent 904b906b63
commit 5f52abba97

View File

@ -78,10 +78,14 @@ const userCreateInvitation = () => {
}
if(ctx.message.chat.id === -1001780498838) {
if(await Player.findOne({ 'email': args[0] })) {
return await ctx.reply('该邮箱已被注册')
}
const [i, v] = makeInvitation(ctx.message.from.username, args[0], 'telegram')
ctx.replyWithMarkdownV2('邀请码:\n```' + i + '```\n\n验证码将发送到私聊如果您未私聊启动过bot则无法接收到消息请 /start 后再次执行此指令。')
try {
await telegraf.telegram.sendMessage(ctx.message.from.id, '验证码:\n```' + v + "```", { parse_mode: 'Markdown' })
await telegraf.telegram.sendMessage(ctx.message.from.id, '验证码(请不要发给任何人)\n```' + v + "```", { parse_mode: 'Markdown' })
} catch (_) { }
} else {
ctx.reply('您不符合自我邀请最低要求,无法获取邀请码')