mirror of
https://github.com/roleypoly/roleypoly-v1.git
synced 2025-06-17 10:39:09 +00:00
[rpc/auth] add bot login/logout calls
This commit is contained in:
parent
e8f0579024
commit
d4112c4252
3 changed files with 50 additions and 2 deletions
|
@ -321,4 +321,13 @@ export default class DiscordService extends Service {
|
|||
isMember (server: string, user: string): boolean {
|
||||
return this.gm(server, user) != null
|
||||
}
|
||||
|
||||
async isValidUser (user: string): Promise<boolean> {
|
||||
const u = await this.fetcher.getUser(user)
|
||||
if (u != null) {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue