message
This commit is contained in:
@@ -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) => {
|
||||
|
||||
6
bin/channel-core/tools.js
Normal file
6
bin/channel-core/tools.js
Normal file
@@ -0,0 +1,6 @@
|
||||
import { client } from "./base.js";
|
||||
|
||||
export async function getRole(guildId){
|
||||
let { data } = await client.roleApi.roles(guildId);
|
||||
return data
|
||||
}
|
||||
Reference in New Issue
Block a user