Commit 67d546ec authored by nanahira's avatar nanahira

logging

parent 4bae4166
......@@ -31,16 +31,16 @@ export default class GuildVerifier {
@InjectConfig()
private config: GuildVerifierConfig;
getUserDisplayName(session: Session) {
private getUserDisplayName(session: Session) {
return `${session.username || '未知用户'}(${session.userId})`;
}
getGuildDisplayName(session: Session) {
private getGuildDisplayName(session: Session) {
return `${session.guildName || '未知群组'}(${session.guildId})`;
}
@UseEvent('guild-request')
private async onGuildRequest(session: Session) {
async onGuildRequest(session: Session) {
const userDisplayName = this.getUserDisplayName(session);
const guildDisplayName = this.getGuildDisplayName(session);
this.logger.info(
......@@ -68,7 +68,11 @@ export default class GuildVerifier {
@InjectLogger()
private logger: Logger;
async handleRequest(session: Session, messageId: string, accept: boolean) {
private async handleRequest(
session: Session,
messageId: string,
accept: boolean,
) {
if (!this.config.isAdmin(session.userId)) {
return '你没有权限操作。';
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment