This commit is contained in:
2022-06-02 15:45:35 +08:00
parent 10aebe67e7
commit 9bfa5a9b9c
9 changed files with 182 additions and 11 deletions

View File

@@ -14,11 +14,11 @@ ws.on('GUILD_MEMBERS', (data) => {
console.log('[GUILD_MEMBERS] 事件接收 :', data);
});
ws.on('GUILD_MESSAGES', (data) => {
// console.log('[GUILD_MESSAGES] 事件接收 :', JSON.stringify(data));
console.log('[GUILD_MESSAGES] 事件接收 :', JSON.stringify(data));
if(data.eventType == "MESSAGE_CREATE"){
messageCreate(data.msg)
messageCreate(data)
}else if(data.eventType == "MESSAGE_DELETE"){
messageDelete(data.msg)
messageDelete(data)
}
});
ws.on('GUILD_MESSAGE_REACTIONS', (data) => {

View File

@@ -0,0 +1,6 @@
import { client } from "./base.js";
export async function getRole(guildId){
let { data } = await client.roleApi.roles(guildId);
return data
}