- Adding an option for booleans to be implemented so the API returns are simplified
- Noob-friendly examples
- Getting each member in a specific guild
Object returns | Boolean |
---|---|
getGuild |
|
getOwner |
|
getChannelsByType |
|
getAllChannelsByObject |
|
getAllNSFWChannels |
|
Name / ID returns | Boolean |
---|---|
getGuild |
|
getOwner |
|
getChannelsByType |
|
getAllChannelsByName |
|
getAllChannelsByID |
|
getAllChannelsWithTimeout |
|
getAllNSFWChannels |
|
getGuild()
const Discord = require("discord.js");
const client = new Discord.Client();
const { Info } = require("guild-collection-api");
console.log(new Info(client).getGuild("603009265346805760")) //Returns the guild object without the boolean parameter supplied
getOwner()
const Discord = require("discord.js");
const client = new Discord.Client();
const { Info } = require("guild-collection-api");
console.log(new Info(client).getOwner("603009265346805760")) //Returns the user object of the owner without the boolean parameter supplied
getChannelsByType()
const Discord = require("discord.js");
const client = new Discord.Client();
const { Info } = require("guild-collection-api");
console.log(new Info(client).getChannelsByType("603009265346805760")) //Returns an object of each channel without the boolean parameter supplied
getAllChannelsByObject()
const Discord = require("discord.js");
const client = new Discord.Client();
const { Info } = require("guild-collection-api");
console.log(new Info(client).getAllChannelsByObject("603009265346805760")) //Returns an object of each channel in the guild. Boolean isn't a viable parameter here
getAllChannelsByName()
const Discord = require("discord.js");
const client = new Discord.Client();
const { Info } = require("guild-collection-api");
console.log(new Info(client).getAllChannelsByName("603009265346805760")) //Returns all channels in the guild by their name. Boolean isn't a viable parameter here
getAllChannelsByID
const Discord = require("discord.js");
const client = new Discord.Client();
const { Info } = require("guild-collection-api");
console.log(new Info(client).getAllChannelsByID("603009265346805760")) //Returns all channels in the guild by their ID. Boolean isn't a viable parameter here
getAllChannelsWithTimeout()
const Discord = require("discord.js");
const client = new Discord.Client();
const { Info } = require("guild-collection-api");
console.log(new Info(client).getAllChannelsWithTimeout("603009265346805760")) //Returns all channels that have a timeout, returns the object of each channel with no boolean parameter supplied
getAllNSFWChannels()
const Discord = require("discord.js");
const client = new Discord.Client();
const { Info } = require("guild-collection-api");
console.log(new Info(client).getAllNSFWChannels("603009265346805760")) //Returns all nsfw channels returns the object of each channel with no boolean parameter supplied
getAllMembersByUserObject()
const Discord = require("discord.js");
const client = new Discord.Client();
const { Info } = require("guild-collection-api");
console.log(new Info(client).getAllMembersByUserObject("603009265346805760"))
//Returns a user object for each member in the guild
getAllMembersByDisplayName()
const Discord = require("discord.js");
const client = new Discord.Client();
const { Info } = require("guild-collection-api");
console.log(new Info(client).getAllMembersByDisplayName("603009265346805760")) //Returns a map of all members in the guild by their display name
getAllMembersByID()
const Discord = require("discord.js");
const client = new Discord.Client();
const { Info } = require("guild-collection-api");
console.log(new Info(client).getAllMembersByID("603009265346805760")) //Returns a map of all members in the guild by their ID and display name depending on if there was a boolean parameter supplied
getAllMemberRoles()
const Discord = require("discord.js");
const client = new Discord.Client();
const { Info } = require("guild-collection-api");
console.log(new Info(client).getAllMemberRoles("603009265346805760", "575108662457139201")) //Returns a map of all the member's roles by the role names + role ids depending on if there was a boolean parameter supplied
getAllGuildRolesByObject()
const Discord = require("discord.js");
const client = new Discord.Client();
const { Info } = require("guild-collection-api");
console.log(new Info(client).getAllGuildRolesByObject("603009265346805760")) //Returns a map of every role in the guild by it's Role Object
getAllGuildRolesByName()
const Discord = require("discord.js");
const client = new Discord.Client();
const { Info } = require("guild-collection-api");
console.log(new Info(client).getAllGuildRolesByName("603009265346805760")) //Returns a map of all the roles in the guild by their name
getAllGuildRolesByID()
const Discord = require("discord.js");
const client = new Discord.Client();
const { Info } = require("guild-collection-api");
console.log(new Info(client).getAllGuildRolesByID("603009265346805760")) //Returns a map of all the roles in the guild by their ID
getAllGuildRolesByHexColor()
const Discord = require("discord.js");
const client = new Discord.Client();
const { Info } = require("guild-collection-api");
console.log(new Info(client).getAllGuildRolesByHexColor("603009265346805760")) //Returns a map of all the roles in the guild by their name + hex color