add content
This commit is contained in:
parent
9bfa5a9b9c
commit
fb2d9ae159
@ -8,8 +8,8 @@ function init(){
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
async function updateActive(member,author,guildId){
|
async function updateActive({member,author,guild_id,content}){
|
||||||
const jointime = dayjs(member.joined_at)
|
const jointime = dayjs(member.joined_at).format('YYYY-MM-DD HH:mm:ss')
|
||||||
// console.log(time.format('YYYY-MM-DD HH:mm:ss'))
|
// console.log(time.format('YYYY-MM-DD HH:mm:ss'))
|
||||||
const nickname = member.nick
|
const nickname = member.nick
|
||||||
const roles = []
|
const roles = []
|
||||||
@ -17,8 +17,19 @@ async function updateActive(member,author,guildId){
|
|||||||
const id = author.id
|
const id = author.id
|
||||||
const bot = author.bot
|
const bot = author.bot
|
||||||
const username = author.username
|
const username = author.username
|
||||||
const roleList = await getRole(guildId)
|
// const roleList = await getRole(guild_id)
|
||||||
console.log(roleList)
|
// const content = content
|
||||||
|
// console.log(roleList)
|
||||||
|
const info = {
|
||||||
|
jointime,
|
||||||
|
nickname,
|
||||||
|
avatar,
|
||||||
|
id,
|
||||||
|
bot,
|
||||||
|
username,
|
||||||
|
content
|
||||||
|
}
|
||||||
|
console.log(info)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -28,6 +39,6 @@ async function updateActive(member,author,guildId){
|
|||||||
*/
|
*/
|
||||||
function createMessage({msg}){
|
function createMessage({msg}){
|
||||||
console.log("收到消息",msg)
|
console.log("收到消息",msg)
|
||||||
updateActive(msg.member,msg.author,msg.guild_id)
|
updateActive(msg)
|
||||||
}
|
}
|
||||||
onMessageCreate(createMessage)
|
onMessageCreate(createMessage)
|
Loading…
Reference in New Issue
Block a user