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