mirror of
https://github.com/roleypoly/roleypoly-v1.git
synced 2025-04-28 21:49:10 +00:00
rpc slug
This commit is contained in:
parent
a98ba13f90
commit
217d3bb59a
1 changed files with 9 additions and 0 deletions
|
@ -11,5 +11,14 @@ export default ($: AppContext) => ({
|
||||||
members: number,
|
members: number,
|
||||||
roles: number
|
roles: number
|
||||||
}>((g: Guild) => ({ url: `${$.config.appUrl}/s/${g.id}`, name: g.name, members: g.members.array().length, roles: g.roles.array().length }))
|
}>((g: Guild) => ({ url: `${$.config.appUrl}/s/${g.id}`, name: g.name, members: g.members.array().length, roles: g.roles.array().length }))
|
||||||
|
},
|
||||||
|
|
||||||
|
getServerSlug (ctx: Context, id: string) {
|
||||||
|
const srv = $.discord.client.guilds.get(id)
|
||||||
|
if (srv == null) {
|
||||||
|
return null
|
||||||
|
}
|
||||||
|
|
||||||
|
return $.P.serverSlug(srv)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
Loading…
Add table
Reference in a new issue