mirror of
https://github.com/syuilo/ai.git
synced 2024-11-22 13:17:59 +00:00
Improve readability
This commit is contained in:
parent
140d3c324d
commit
cac1badb98
|
@ -128,7 +128,10 @@ export default class 藍 {
|
||||||
private onMention(msg: MessageLike) {
|
private onMention(msg: MessageLike) {
|
||||||
this.log(chalk.gray(`<<< An message received: ${chalk.underline(msg.id)}`));
|
this.log(chalk.gray(`<<< An message received: ${chalk.underline(msg.id)}`));
|
||||||
|
|
||||||
const context = !msg.isMessage && msg.replyId == null ? null : this.contexts.findOne(msg.isMessage ? {
|
const isNoContext = !msg.isMessage && msg.replyId == null;
|
||||||
|
|
||||||
|
// Look up the context
|
||||||
|
const context = isNoContext ? null : this.contexts.findOne(msg.isMessage ? {
|
||||||
isMessage: true,
|
isMessage: true,
|
||||||
userId: msg.userId
|
userId: msg.userId
|
||||||
} : {
|
} : {
|
||||||
|
|
Loading…
Reference in a new issue