mirror of
https://github.com/syuilo/ai.git
synced 2025-03-25 21:12:56 +00:00
絵文字リアクション関係でいい感じにした
This commit is contained in:
parent
b2875c9d90
commit
b157d0a868
5 changed files with 23 additions and 2 deletions
|
@ -507,4 +507,12 @@ export default class 藍 {
|
||||||
|
|
||||||
this.meta.update(rec);
|
this.meta.update(rec);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* ご主人様かどうかを返します
|
||||||
|
*/
|
||||||
|
@autobind
|
||||||
|
public isMaster(userId: User['id']): boolean {
|
||||||
|
return config.masterID === userId;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,6 +2,7 @@ type Config = {
|
||||||
host: string;
|
host: string;
|
||||||
i: string;
|
i: string;
|
||||||
master?: string;
|
master?: string;
|
||||||
|
masterID?: string;
|
||||||
wsUrl: string;
|
wsUrl: string;
|
||||||
apiUrl: string;
|
apiUrl: string;
|
||||||
keywordEnabled: boolean;
|
keywordEnabled: boolean;
|
||||||
|
|
|
@ -85,7 +85,7 @@ promiseRetry(retry => {
|
||||||
new PingModule(),
|
new PingModule(),
|
||||||
new WelcomeModule(),
|
new WelcomeModule(),
|
||||||
new ServerModule(),
|
new ServerModule(),
|
||||||
new FollowModule(),
|
// new FollowModule(),
|
||||||
new BirthdayModule(),
|
new BirthdayModule(),
|
||||||
new ValentineModule(),
|
new ValentineModule(),
|
||||||
new KeywordModule(),
|
new KeywordModule(),
|
||||||
|
|
|
@ -1,6 +1,13 @@
|
||||||
export type Note = {
|
export type Note = {
|
||||||
id: string;
|
id: string;
|
||||||
|
createdAt: Date;
|
||||||
|
userId: string;
|
||||||
|
user: {
|
||||||
|
id: string;
|
||||||
|
},
|
||||||
text: string | null;
|
text: string | null;
|
||||||
|
cw: string | null;
|
||||||
|
visibility: "public" | "home" | "followers" | "specified";
|
||||||
reply: any | null;
|
reply: any | null;
|
||||||
poll?: {
|
poll?: {
|
||||||
choices: {
|
choices: {
|
||||||
|
|
|
@ -91,7 +91,12 @@ export default class extends Module {
|
||||||
if (includes(note.text, ['寿司', 'sushi']) || note.text === 'すし') return react('🍣');
|
if (includes(note.text, ['寿司', 'sushi']) || note.text === 'すし') return react('🍣');
|
||||||
|
|
||||||
if (includes(note.text, ['ずなず']) || includes(note.text, ['ずにゃず'])) return react('🙌');
|
if (includes(note.text, ['ずなず']) || includes(note.text, ['ずにゃず'])) return react('🙌');
|
||||||
if (includes(note.text, ['なず']) || includes(note.text, ['にゃず'])) return react(':google_hart:');
|
if (includes(note.text, ['なず']) || includes(note.text, ['にゃず'])) {
|
||||||
|
if (this.ai.isMaster(note.userId)) {
|
||||||
|
return react(':google_hart:')
|
||||||
|
}
|
||||||
|
return react(':oltu:');
|
||||||
|
};
|
||||||
|
|
||||||
const gameReact = [
|
const gameReact = [
|
||||||
':ysvi:',
|
':ysvi:',
|
||||||
|
|
Loading…
Reference in a new issue