Scripts(2.0 β)
v1.23.0
function onMessage(message) {
return { messages: [{ text: "something" }] }
}type Message = {
to: string | null;
toName: string;
from: string;
name: string;
iconUrl: string | null;
color: string;
imageUrl: string | null;
text: string;
type: "text" | "note" | "system";
extend: {
roll?: {
result: string;
dices: { kind: string; value: number; faces: number }[];
secret: boolean;
success: boolean;
failure: boolean;
critical: boolean;
fumble: boolean;
};
};
removed: boolean;
edited: boolean;
channel: string;
channelName: string;
createdAt: Timestamp;
updatedAt: Timestamp;
};
type ReturnValue = {
messages: { text: string }[]
}
type onMessage = (message: Message) => ReturnValue;例
ランダム表
外部API
最終更新
役に立ちましたか?