mirror of
https://github.com/roleypoly/roleypoly-v1.git
synced 2025-06-16 02:19:08 +00:00
further social improvements, client-render edge cases
This commit is contained in:
parent
dd07e6bac4
commit
1c784d0605
4 changed files with 9 additions and 7 deletions
|
@ -26,16 +26,22 @@ export default ($: AppContext) => ({
|
|||
const { userId } = (ctx.session: { userId: string })
|
||||
|
||||
const srv = $.discord.client.guilds.get(id)
|
||||
|
||||
if (srv == null) {
|
||||
return { err: 'not_found' }
|
||||
}
|
||||
|
||||
if (userId == null) {
|
||||
return {
|
||||
id: id,
|
||||
server: $.P.serverSlug(srv)
|
||||
}
|
||||
}
|
||||
|
||||
let gm
|
||||
if (srv.members.has(userId)) {
|
||||
gm = $.discord.gm(id, userId)
|
||||
} else if ($.discord.isRoot(userId)) {
|
||||
// gm = $.discord.fakeGm({ id: userId })
|
||||
gm = $.discord.fakeGm({ id: userId })
|
||||
}
|
||||
|
||||
if (gm == null) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue