mirror of
https://github.com/Jerryplusy/crystelf-plugin.git
synced 2025-10-14 05:39:18 +00:00
fix:增加错误提示
This commit is contained in:
parent
262ef938c2
commit
7b1fe3e402
@ -15,6 +15,7 @@ export class welcomeNewcomer extends plugin {
|
||||
* @returns {Promise<void>}
|
||||
*/
|
||||
async accept(e) {
|
||||
try {
|
||||
if (e.user_id === e.self_id) return;
|
||||
const groupId = e.group_id;
|
||||
const cdKey = `Yz:newcomers:${groupId}`;
|
||||
@ -27,5 +28,8 @@ export class welcomeNewcomer extends plugin {
|
||||
if (cfg.image) msgList.push(segment.image(cfg.image));
|
||||
if (!cfg.text && !cfg.image) msgList.push('欢迎新人~!');
|
||||
await e.reply(msgList);
|
||||
} catch (e) {
|
||||
return e.reply('加群欢迎出现错误,请重新设置加群欢迎', true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user