This commit is contained in:
@ -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('您不符合自我邀请最低要求,无法获取邀请码')
|
||||
|
Reference in New Issue
Block a user