军团活动:修改debug接口
This commit is contained in:
@@ -31,12 +31,14 @@ Filter.prototype.before = async function (routeRecord: RouteRecord, msg: any, se
|
||||
}
|
||||
|
||||
let hasBlockWords = false;
|
||||
if(routeRecord.route == 'guild.guildHandler.createGuild') {
|
||||
hasBlockWords = await checkFilterWords(msg.name);
|
||||
} else if (routeRecord.route == 'role.roleHandler.initRole') {
|
||||
hasBlockWords = await checkFilterWords(msg.roleName);
|
||||
} else if (routeRecord.route == 'role.roleHandler.rename') {
|
||||
hasBlockWords = await checkFilterWords(msg.roleName);
|
||||
if(pinus.app.get('env') == 'production') {
|
||||
if(routeRecord.route == 'guild.guildHandler.createGuild') {
|
||||
hasBlockWords = await checkFilterWords(msg.name);
|
||||
} else if (routeRecord.route == 'role.roleHandler.initRole') {
|
||||
hasBlockWords = await checkFilterWords(msg.roleName);
|
||||
} else if (routeRecord.route == 'role.roleHandler.rename') {
|
||||
hasBlockWords = await checkFilterWords(msg.roleName);
|
||||
}
|
||||
}
|
||||
if(hasBlockWords) return next(new Error(), resResult(STATUS.BLOCK_WORDS));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user