mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-10 00:23:30 +01:00
Added leave server and other stuff
This commit is contained in:
@@ -15,6 +15,21 @@ class Resolver {
|
||||
constructor(internal) {
|
||||
this.internal = internal;
|
||||
}
|
||||
|
||||
resolveServer(resource){
|
||||
if(resource instanceof Server){
|
||||
return resource;
|
||||
}else if(resource instanceof ServerChannel){
|
||||
return resource.server;
|
||||
}else if(resource instanceof String || typeof resource === "string"){
|
||||
return this.internal.servers.get("id", resource);
|
||||
}else if(resource instanceof Message){
|
||||
if(resource.channel instanceof TextChannel){
|
||||
return resource.server;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
resolveFile(resource) {
|
||||
if (typeof resource === "string" || resource instanceof String) {
|
||||
|
||||
Reference in New Issue
Block a user