mirror of
https://github.com/oceanprotocol/community-numbers.git
synced 2024-12-22 01:03:26 +01:00
fixed wrong discord members value
This commit is contained in:
parent
e4b5f3b552
commit
ec03e58149
@ -12,9 +12,10 @@ export default async function fetchDiscord() {
|
||||
|
||||
// extract members count from meta description
|
||||
const metaDescription = data('meta[name="description"]').attr('content')
|
||||
const regex = /\d+/ // one or more digits
|
||||
const regex = /\d+[,]\d+/ // one or more digits
|
||||
const number = metaDescription.match(regex)
|
||||
const members = parseInt(number[0])
|
||||
const membersNumber = number[0].replace(/,/,'')
|
||||
const members = parseInt(membersNumber)
|
||||
|
||||
log(
|
||||
'✓ Discord. ' +
|
||||
|
Loading…
Reference in New Issue
Block a user