diff --git a/src/Interface/ListIndex.ts b/src/Interface/ListIndex.ts index b0eb6ef4..be1a37ac 100644 --- a/src/Interface/ListIndex.ts +++ b/src/Interface/ListIndex.ts @@ -2,44 +2,25 @@ // // This section is automatically generated by the 'build:source' script, any change will be overwritten -import BladeList from './Lists/BladeList' -import Blist from './Lists/Blist' import BotlistMe from './Lists/BotlistMe' import BotsOnDiscord from './Lists/BotsOnDiscord' import Carbon from './Lists/Carbon' -import DBots from './Lists/DBots' import DList from './Lists/DList' -import DiscordBoats from './Lists/DiscordBoats' import DiscordBotList from './Lists/DiscordBotList' import DiscordBotlistEU from './Lists/DiscordBotlistEU' import DiscordBotsGG from './Lists/DiscordBotsGG' import DiscordExtremeList from './Lists/DiscordExtremeList' -import DiscordLabs from './Lists/DiscordLabs' -import DiscordListSpace from './Lists/DiscordListSpace' -import DiscordListology from './Lists/DiscordListology' import DiscordServices from './Lists/DiscordServices' import DiscordsCom from './Lists/DiscordsCom' import Disforge from './Lists/Disforge' -import FatesList from './Lists/FatesList' import InfinityBotList from './Lists/InfinityBotList' -import Listcord from './Lists/Listcord' -import MotionBotList from './Lists/MotionBotList' import Radarcord from './Lists/Radarcord' -import SpaceBotsList from './Lists/SpaceBotsList' -import TopCord from './Lists/TopCord' import TopGG from './Lists/TopGG' import VoidBots from './Lists/VoidBots' -import WonderBotList from './Lists/WonderBotList' import YABL from './Lists/YABL' // prettier-ignore export const serviceList = { - 'bladebotlist': BladeList, - 'bladebotlist.xyz': BladeList, - 'bladelist': BladeList, - 'bladelist.gg': BladeList, - 'blist': Blist, - 'blist.xyz': Blist, 'botlistme': BotlistMe, 'botlist.me': BotlistMe, 'botsondiscord': BotsOnDiscord, @@ -47,14 +28,10 @@ export const serviceList = { 'carbonitex': Carbon, 'carbonitex.net': Carbon, 'carbon': Carbon, - 'dbots': DBots, - 'dbots.co': DBots, 'dlistgg': DList, 'dlist.gg': DList, 'discordlistgg': DList, 'discordlist.gg': DList, - 'discordboats': DiscordBoats, - 'discord.boats': DiscordBoats, 'discordbotlist': DiscordBotList, 'discordbotlist.com': DiscordBotList, 'dbleu': DiscordBotlistEU, @@ -63,14 +40,6 @@ export const serviceList = { 'discord.bots.gg': DiscordBotsGG, 'discordextremelist': DiscordExtremeList, 'discordextremelist.xyz': DiscordExtremeList, - 'discordlabs': DiscordLabs, - 'discordlabs.org': DiscordLabs, - 'discordlistspace': DiscordListSpace, - 'discordlist.space': DiscordListSpace, - 'botlistspace': DiscordListSpace, - 'botlist.space': DiscordListSpace, - 'discordlistology': DiscordListology, - 'discordlistology.com': DiscordListology, 'discordservices': DiscordServices, 'discordservices.net': DiscordServices, 'botsfordiscord': DiscordsCom, @@ -79,31 +48,19 @@ export const serviceList = { 'discords.com': DiscordsCom, 'disforge': Disforge, 'disforge.com': Disforge, - 'fateslist': FatesList, - 'fateslist.xyz': FatesList, 'infinitybotlist': InfinityBotList, 'infinitybotlist.com': InfinityBotList, - 'listcord': Listcord, - 'listcord.gg': Listcord, - 'motion': MotionBotList, - 'motiondevelopment': MotionBotList, - 'motionbotlist': MotionBotList, - 'motiondevelopment.top': MotionBotList, + 'infinitybots': InfinityBotList, + 'infinitybots.gg': InfinityBotList, 'radar': Radarcord, 'radarbots': Radarcord, 'radarbotdirectory.xyz': Radarcord, 'radarcord': Radarcord, 'radarcord.net': Radarcord, - 'spacebotslist': SpaceBotsList, - 'space-bot-list.xyz': SpaceBotsList, - 'topcord': TopCord, - 'topcord.xyz': TopCord, 'topgg': TopGG, 'top.gg': TopGG, 'voidbots': VoidBots, 'voidbots.net': VoidBots, - 'wonderbotlist': WonderBotList, - 'wonderbotlist.com': WonderBotList, 'yabl': YABL, 'yabl.xyz': YABL, } diff --git a/src/Interface/Lists/BladeList.ts b/src/Interface/Lists/BladeList.ts deleted file mode 100644 index 24fe8383..00000000 --- a/src/Interface/Lists/BladeList.ts +++ /dev/null @@ -1,67 +0,0 @@ -import { Service, ServicePostOptions } from '../Service' -import { Util, IDResolvable } from '../../Utils/Util' - -/** - * Represents the BladeList service. - * @see https://docs.bladelist.gg/en/latest/api/index.html - */ -export default class BladeList extends Service { - /** The values that can be used to select the service. */ - static get aliases() { - return ['bladebotlist', 'bladebotlist.xyz', 'bladelist', 'bladelist.gg'] - } - - /** The logo URL. */ - static get logoURL() { - return 'https://bladelist.gg/static/img/logo.png' - } - - /** Service's name. */ - static get serviceName() { - return 'BladeList' - } - - /** The website URL. */ - static get websiteURL() { - return 'https://bladelist.gg' - } - - /** The base URL of the service's API. */ - static get baseURL() { - return 'https://api.bladelist.gg' - } - - /** - * Posts statistics to this service. - * @param options The options of the request. - */ - static post(options: ServicePostOptions) { - const { token, clientID, serverCount, shard } = options - return super._post({ - method: 'put', - url: `/bots/${Util.resolveID(clientID)}/`, - headers: { - Authorization: token, - 'Content-Type': 'application/json' - }, - data: { - server_count: Util.resolveCount(serverCount), - ...(shard ? { shard_count: shard.count } : {}) - } - }) - } - - /** - * Gets a bot listed on this service. - * @param id The bot's ID. - */ - getBot(id: IDResolvable) { - return this._request( - { - url: `/bots/${Util.resolveID(id)}`, - headers: { Authorization: this.token } - }, - { requiresToken: true } - ) - } -} diff --git a/src/Interface/Lists/Blist.ts b/src/Interface/Lists/Blist.ts deleted file mode 100644 index a9ec7070..00000000 --- a/src/Interface/Lists/Blist.ts +++ /dev/null @@ -1,127 +0,0 @@ -import { Service, ServicePostOptions } from '../Service' -import { Util, IDResolvable } from '../../Utils/Util' -import { Query } from '../../Utils/Constants' - -/** - * Represents the Blist service. - * @see https://blist.xyz/docs/ - */ -export default class Blist extends Service { - /** The values that can be used to select the service. */ - static get aliases() { - return ['blist', 'blist.xyz'] - } - - /** The logo URL. */ - static get logoURL() { - return 'https://blist.xyz/main_site/staticfiles/main/assets/blist.png' - } - - /** Service's name. */ - static get serviceName() { - return 'Blist' - } - - /** The website URL. */ - static get websiteURL() { - return 'https://blist.xyz' - } - - /** The base URL of the service's API. */ - static get baseURL() { - return 'https://blist.xyz/api/v2' - } - - /** - * Posts statistics to this service. - * @param options The options of the request - */ - static post(options: ServicePostOptions) { - const { token, clientID, serverCount, shard } = options - return super._post({ - method: 'patch', - url: `/bot/${Util.resolveID(clientID)}/stats/`, - headers: { Authorization: token }, - data: shard - ? { - server_count: Util.resolveCount(serverCount), - shard_count: shard.count - } - : { server_count: Util.resolveCount(serverCount) } - }) - } - - /** - * Gets the user listed on this service. - * @param id The user's ID - */ - getUser(id: IDResolvable) { - return this._request({ url: `/user/${Util.resolveID(id)}` }) - } - - /** - * Gets the user's bots listed on this service. - * @param id The user's ID - */ - getUserBots(id: IDResolvable) { - return this._request({ url: `/user/${Util.resolveID(id)}/bots` }) - } - - /** - * Gets the user's servers listed on this service. - * @param id The user's ID - */ - getUserServers(id: IDResolvable) { - return this._request({ url: `/user/${Util.resolveID(id)}/servers` }) - } - - /** - * Gets the server listed on this service. - * @param id The server's ID - */ - getServer(id: IDResolvable) { - return this._request({ url: `/server/${Util.resolveID(id)}` }) - } - - /** - * Gets the bot listed on this service. - * @param id The bot's ID - */ - getBot(id: IDResolvable) { - return this._request({ url: `/bot/${Util.resolveID(id)}` }) - } - - /** - * Gets the list of people who voted this bot on this service. - * @param id The bot's ID - */ - getBotVotes(id: IDResolvable) { - return this._request( - { - url: `/bot/${Util.resolveID(id)}/votes`, - headers: { Authorization: this.token } - }, - { - requiresToken: true - } - ) - } - - /** - * Gets the bot's reviews on this service. - * @param id The bot's ID - */ - getBotReviews(id: IDResolvable) { - return this._request({ url: `/bot/${Util.resolveID(id)}/reviews` }) - } - - /** - * Gets the widget URL for this bot. - * @param id The bot's ID - * @param query The query string that will be used in the request - */ - getWidgetURL(id: IDResolvable, query: Query) { - const actualQuery = Object.assign({ type: 'normal' }, query) - return this._appendQuery(`/bot/${Util.resolveID(id)}/widget`, actualQuery) - } -} diff --git a/src/Interface/Lists/DBots.ts b/src/Interface/Lists/DBots.ts deleted file mode 100644 index 2cec0a67..00000000 --- a/src/Interface/Lists/DBots.ts +++ /dev/null @@ -1,76 +0,0 @@ -import { Service, ServicePostOptions } from '../Service' -import { Util, IDResolvable } from '../../Utils/Util' - -/** - * Represents the DBots service. - * @see https://docs.dbots.co/ - */ -export default class DBots extends Service { - /** The values that can be used to select the service. */ - static get aliases() { - return ['dbots', 'dbots.co'] - } - - /** The logo URL. */ - static get logoURL() { - return 'https://gblobscdn.gitbook.com/spaces%2F-MO490c2KMEgwyXnbtbV%2Favatar-1607528014691.png' - } - - /** Service's name. */ - static get serviceName() { - return 'DBots.co' - } - - /** The website URL. */ - static get websiteURL() { - return 'https://dbots.co/' - } - - /** The base URL of the service's API. */ - static get baseURL() { - return 'https://dbots.co/api/v1' - } - - /** - * Posts statistics to this service. - * Shard data posting is not supported for this service. - * @param options The options of the request - */ - static post(options: ServicePostOptions) { - const { token, clientID, serverCount } = options - return super._post({ - method: 'post', - url: `/bots/${Util.resolveID(clientID)}/stats`, - headers: { Authorization: token }, - data: { guildCount: Util.resolveCount(serverCount) } - }) - } - - /** - * Gets the bot's audit logs. - * @param id The bot's ID - */ - getAudit(id: IDResolvable) { - return this._request( - { - url: `/bots/${Util.resolveID(id)}/log`, - headers: { Authorization: this.token } - }, - { requiresToken: true } - ) - } - - /** - * Regenerates the bot API token. - * @param id The bot's ID - */ - regenToken(id: IDResolvable) { - return this._request( - { - url: `/bots/${Util.resolveID(id)}/keys/regen`, - headers: { Authorization: this.token } - }, - { requiresToken: true } - ) - } -} diff --git a/src/Interface/Lists/DiscordBoats.ts b/src/Interface/Lists/DiscordBoats.ts deleted file mode 100644 index 1724af9b..00000000 --- a/src/Interface/Lists/DiscordBoats.ts +++ /dev/null @@ -1,86 +0,0 @@ -import { Service, ServicePostOptions } from '../Service' -import { Util, IDResolvable } from '../../Utils/Util' -import { Query } from '../../Utils/Constants' - -/** - * Represents the Discord Boats service. - * @see https://discord.boats/api/docs - */ -export default class DiscordBoats extends Service { - /** The values that can be used to select the service. */ - static get aliases() { - return ['discordboats', 'discord.boats'] - } - - /** The logo URL. */ - static get logoURL() { - return 'https://discord.boats/android-icon-192x192.png' - } - - /** Service's name. */ - static get serviceName() { - return 'Discord Boats' - } - - /** The website URL. */ - static get websiteURL() { - return 'https://discord.boats' - } - - /** The base URL of the service's API. */ - static get baseURL() { - return 'https://discord.boats/api/v2' - } - - /** - * Posts statistics to this service. - * Shard data posting is not supported for this service. - * @param options The options of the request - */ - static post(options: ServicePostOptions) { - const { token, clientID, serverCount } = options - return super._post({ - method: 'post', - url: `/bot/${Util.resolveID(clientID)}`, - headers: { Authorization: token }, - data: { server_count: Util.resolveCount(serverCount) } - }) - } - - /** - * Gets the bot listed on this service. - * @param id The bot's ID - */ - getBot(id: IDResolvable) { - return this._request({ url: `/bot/${Util.resolveID(id)}` }) - } - - /** - * Gets the user listed on this service. - * @param id The user's ID - */ - getUser(id: IDResolvable) { - return this._request({ url: `/user/${Util.resolveID(id)}` }) - } - - /** - * Checks whether or not a user has voted for a bot on this service. - * @param id The bot's ID - * @param userID The user's ID - */ - userVoted(id: IDResolvable, userID: IDResolvable) { - return this._request({ - url: `/bot/${Util.resolveID(id)}/voted`, - params: { id: Util.resolveID(userID) } - }) - } - - /** - * Gets the widget URL for this bot. - * @param id The bot's ID - * @param query The query string that will be used in the request - */ - getWidgetURL(id: IDResolvable, query?: Query) { - return this._appendQuery(`/widget/${Util.resolveID(id)}`, query || {}) - } -} diff --git a/src/Interface/Lists/DiscordLabs.ts b/src/Interface/Lists/DiscordLabs.ts deleted file mode 100644 index 179d2228..00000000 --- a/src/Interface/Lists/DiscordLabs.ts +++ /dev/null @@ -1,71 +0,0 @@ -import { Service, ServicePostOptions } from '../Service' -import { Util, IDResolvable } from '../../Utils/Util' - -/** - * Represents the Discord Labs service. - * @see https://docs.discordlabs.org/#/api - */ -export default class DiscordLabs extends Service { - /** The values that can be used to select the service. */ - static get aliases() { - return ['discordlabs', 'discordlabs.org'] - } - - /** The logo URL. */ - static get logoURL() { - return 'https://avatars2.githubusercontent.com/u/54491479?v=4' - } - - /** Service's name. */ - static get serviceName() { - return 'Discord Labs' - } - - /** The website URL. */ - static get websiteURL() { - return 'https://bots.discordlabs.org/' - } - - /** The base URL of the service's API. */ - static get baseURL() { - return 'https://bots.discordlabs.org/v2' - } - - /** - * Posts statistics to this service. - * @param options The options of the request - */ - static post(options: ServicePostOptions) { - const { token, clientID, serverCount, shard } = options - return super._post({ - method: 'post', - url: `/bot/${Util.resolveID(clientID)}/stats`, - data: shard - ? { - token, - server_count: Util.resolveCount(serverCount), - shard_count: shard.count - } - : { - token, - server_count: Util.resolveCount(serverCount) - } - }) - } - - /** - * Gets the bot listed on this service. - * @param id The bot's ID - */ - getBot(id: IDResolvable) { - return this._request({ url: `/bot/${Util.resolveID(id)}` }) - } - - /** - * Gets the votes for this bot. - * @param id The bot's id. - */ - getVotes(id: IDResolvable) { - return this._request({ url: `/bot/${Util.resolveID(id)}/votes` }) - } -} diff --git a/src/Interface/Lists/DiscordListSpace.ts b/src/Interface/Lists/DiscordListSpace.ts deleted file mode 100644 index 72cf8d03..00000000 --- a/src/Interface/Lists/DiscordListSpace.ts +++ /dev/null @@ -1,223 +0,0 @@ -import { Service, ServicePostOptions } from '../Service' -import { Util, IDResolvable } from '../../Utils/Util' -import { Query } from '../../Utils/Constants' - -/** - * Represents the discordlist.space service. - * @see https://docs.discordlist.space/ - */ -export default class DiscordListSpace extends Service { - /** The values that can be used to select the service. */ - static get aliases() { - return [ - 'discordlistspace', - 'discordlist.space', - 'botlistspace', - 'botlist.space' - ] - } - - /** The logo URL. */ - static get logoURL() { - return 'https://discordlist.space/img/android-chrome-512x512.png' - } - - /** Service's name. */ - static get serviceName() { - return 'discordlist.space' - } - - /** The website URL. */ - static get websiteURL() { - return 'https://discordlist.space' - } - - /** The base URL of the service's API. */ - static get baseURL() { - return 'https://api.discordlist.space/v2' - } - - /** - * Posts statistics to this service. - * Shard data posting is not supported for this service. - * @param options The options of the request - */ - static post(options: ServicePostOptions) { - const { token, clientID, serverCount } = options - return super._post({ - method: 'post', - url: `/bots/${Util.resolveID(clientID)}`, - headers: { Authorization: token, 'Content-Type': 'application/json' }, - data: { serverCount: Util.resolveCount(serverCount) } - }) - } - - /** Gets the statistics of this service. */ - getStatistics() { - return this._request({ url: '/statistics' }) - } - - /** - * Gets all the available languages that bots or servers can set as their language. - * @param query The query to use in the request. - */ - getLanguages(query?: Query) { - return this._request({ url: '/languages', params: query }) - } - - /** - * Gets all available tags for use on bots or servers. - * @param query The query to use in the request. - */ - getTags(query?: Query) { - return this._request({ url: '/tags', params: query }) - } - - /** - * Gets a list of bots on this service. - * @param query The query to use in the request. - */ - getBots(query?: Query) { - return this._request({ url: '/bots', params: query }) - } - - /** - * Gets the bot listed on this service. - * @param id The bot's ID. - */ - getBot(id: IDResolvable) { - return this._request({ url: `/bots/${Util.resolveID(id)}` }) - } - - /** - * Gets the reviews of a bot. - * @param id The bot's ID. - * @param query The query to use in the request. - */ - getBotReviews(id: IDResolvable, query?: Query) { - return this._request({ - url: `/bots/${Util.resolveID(id)}/reviews`, - params: query - }) - } - - /** - * Gets the analytics on a bot. - * @param id The bot's ID. - * @param query The query to use in the request. - */ - getBotAnalytics(id: IDResolvable, query?: Query) { - return this._request( - { - url: `/bots/${Util.resolveID(id)}/analytics`, - headers: { Authorization: this.token }, - params: query - }, - { requiresToken: true } - ) - } - - /** - * Gets the list of people who voted this bot on this service. - * @param id The bot's ID. - */ - getBotVotes(id: IDResolvable) { - return this._request( - { - url: `/bots/${Util.resolveID(id)}/upvotes`, - headers: { Authorization: this.token } - }, - { - requiresToken: true - } - ) - } - - /** - * Checks if a specific user has upvoted the bot. - * @param botID The bot's ID. - * @param userID The user's ID. - */ - getUserUpvote(botID: IDResolvable, userID: IDResolvable) { - return this._request( - { - url: `/bots/${Util.resolveID(botID)}/upvotes/status/${Util.resolveID( - userID - )}`, - headers: { Authorization: this.token } - }, - { requiresToken: true } - ) - } - - /** - * Gets the top upvoters of this month. - * @param id The bot's ID. - * @param query The query to use with the request. - */ - getUpvoteLeaderboard(id: IDResolvable, query?: Query) { - return this._request({ - url: `/bots/${Util.resolveID(id)}/upvotes/leaderboard`, - params: query - }) - } - - /** - * Gets the bot listing audit log. - * @param id The bot's ID. - * @param query The query to use with the request. - */ - getAuditLog(id: IDResolvable, query?: Query) { - return this._request( - { - url: `/bots/${Util.resolveID(id)}/audit`, - headers: { Authorization: this.token }, - params: query - }, - { requiresToken: true } - ) - } - - /** - * Gets the owners of the bot listing. - * @param id The bot's ID. - * @param query The query to use in the request. - */ - getBotOwners(id: IDResolvable, query?: Query) { - return this._request({ - url: `/bots/${Util.resolveID(id)}/owners`, - params: query - }) - } - - /** - * Gets the user listed on this service. - * @param id The user's ID. - */ - getUser(id: IDResolvable) { - return this._request({ url: `/users/${Util.resolveID(id)}` }) - } - - /** - * Gets the user's bots listed for this service. - * @param id The user's ID. - */ - getUserBots(id: IDResolvable) { - return this._request({ - url: `/users/${Util.resolveID(id)}/bots`, - headers: { Authorization: this.token } - }) - } - - /** - * Get all the lists that a user owns. - * @param id The user's ID. - * @param query The query to use in the request. - */ - getUserReviews(id: IDResolvable, query?: Query) { - return this._request({ - url: `/users/${Util.resolveID(id)}/reviews`, - params: query - }) - } -} diff --git a/src/Interface/Lists/DiscordListology.ts b/src/Interface/Lists/DiscordListology.ts deleted file mode 100644 index 167d24ff..00000000 --- a/src/Interface/Lists/DiscordListology.ts +++ /dev/null @@ -1,90 +0,0 @@ -import { Service, ServicePostOptions } from '../Service' -import { Util, IDResolvable } from '../../Utils/Util' - -/** - * Represents the DiscordListology service. - * @see https://discordlistology.com/developer/documentation - */ -export default class DiscordListology extends Service { - /** The values that can be used to select the service. */ - static get aliases() { - return ['discordlistology', 'discordlistology.com'] - } - - /** The logo URL. */ - static get logoURL() { - return 'https://i.imgur.com/DmSCuSk.png' - } - - /** Service's name. */ - static get serviceName() { - return 'DiscordListology' - } - - /** The website URL. */ - static get websiteURL() { - return 'https://discordlistology.com/' - } - - /** The base URL of the service's API. */ - static get baseURL() { - return 'https://discordlistology.com/api/v1' - } - - /** - * Posts statistics to this service. - * @param options The options of the request - */ - static post(options: ServicePostOptions) { - const { token, clientID, serverCount, shard } = options - return super._post({ - method: 'post', - url: `/bots/${Util.resolveID(clientID)}/stats`, - headers: { Authorization: token }, - data: shard - ? { - servers: Util.resolveCount(serverCount), - shards: shard.count - } - : { servers: Util.resolveCount(serverCount) } - }) - } - - /** - * Gets the bot's stats listed on this service. - * @param id The bot's ID - */ - getBotStats(id: IDResolvable) { - return this._request({ url: `/bots/${Util.resolveID(id)}/stats` }) - } - - /** - * Checks whether or not a user has voted for a bot on this service. - * @param id The bot's ID - * @param userID The user's ID - */ - userVotedBot(id: IDResolvable, userID: IDResolvable) { - return this._request({ - url: `/bots/${Util.resolveID(userID)}/hasvoted/${Util.resolveID(id)}` - }) - } - - /** - * Gets the guild's stats listed on this service. - * @param id The guild's ID - */ - getGuildStats(id: IDResolvable) { - return this._request({ url: `/guilds/${Util.resolveID(id)}/stats` }) - } - - /** - * Checks whether or not a user has voted for a guild on this service. - * @param id The guild's ID - * @param userID The user's ID - */ - userVotedGuild(id: IDResolvable, userID: IDResolvable) { - return this._request({ - url: `/guilds/${Util.resolveID(userID)}/hasvoted/${Util.resolveID(id)}` - }) - } -} diff --git a/src/Interface/Lists/FatesList.ts b/src/Interface/Lists/FatesList.ts deleted file mode 100644 index a7a07aa4..00000000 --- a/src/Interface/Lists/FatesList.ts +++ /dev/null @@ -1,126 +0,0 @@ -import { Service, ServicePostOptions } from '../Service' -import { Util, IDResolvable } from '../../Utils/Util' -import { Query } from '../../Utils/Constants' - -/** - * Represents the FatesList service. - * @see https://fateslist.xyz/api/docs/redoc - */ -export default class FatesList extends Service { - /** The values that can be used to select the service. */ - static get aliases() { - return ['fateslist', 'fateslist.xyz'] - } - - /** The logo URL. */ - static get logoURL() { - return 'https://cdn.discordapp.com/avatars/798951566634778641/dfb619dd43f9039dbd4d7854845aa0ca.png' - } - - /** Service's name. */ - static get serviceName() { - return 'Fates List' - } - - /** The website URL. */ - static get websiteURL() { - return 'https://fateslist.xyz/' - } - - /** The base URL of the service's API. */ - static get baseURL() { - return 'https://fateslist.xyz/api/v2' - } - - /** - * Posts statistics to this service. - * Shard data posting is not supported for this service. - * @param options The options of the request - */ - static post(options: ServicePostOptions) { - const { token, clientID, serverCount, userCount, shard } = options - return super._post({ - method: 'post', - url: `/bots/${Util.resolveID(clientID)}/stats`, - headers: { Authorization: token }, - data: { - guild_count: Util.resolveCount(serverCount), - user_count: Util.resolveCount(userCount), - ...(shard - ? { - shard_count: Util.resolveCount(shard.count) - } - : {}) - } - }) - } - - /** - * Gets the number of votes the bot has received. - * @param id The bot's ID. - */ - getVotesPerMonth(id: IDResolvable) { - return this._request({ - url: `/bots/${Util.resolveID(id)}/vpm` - }) - } - - /** - * Regenerates a bot token. Use this if it is compromised. - * @param id The bot's ID. - */ - regenerateBotToken(id: IDResolvable) { - return this._request( - { - method: 'patch', - url: `/bots/${Util.resolveID(id)}/token`, - headers: { Authorization: this.token } - }, - { requiresToken: true } - ) - } - - /** - * Fetch a random bot. - * @param query The query to use. - */ - getRandomBot(query?: Query) { - return this._request({ - url: `/bots/0/random`, - params: query - }) - } - - /** - * Fetches bot information given a bot ID. - * @param id The bot's ID. - * @param query The query to use. - */ - getBot(id: IDResolvable, query?: Query) { - return this._request({ - url: `/bots/${Util.resolveID(id)}`, - params: query - }) - } - - /** - * Checks whether the given bot id is listed. - * @param id The bot's ID. - */ - botExists(id: IDResolvable) { - return this._request({ - method: 'head', - url: `/bots/${Util.resolveID(id)}` - }) - } - - /** - * Gets the bot's WebSocket events. - * @param id The bot's ID. - */ - getBotWSEvents(id: IDResolvable) { - return this._request({ - url: `/bots/${Util.resolveID(id)}/ws_events` - }) - } -} diff --git a/src/Interface/Lists/InfinityBotList.ts b/src/Interface/Lists/InfinityBotList.ts index 74e6e1c2..e54bda84 100644 --- a/src/Interface/Lists/InfinityBotList.ts +++ b/src/Interface/Lists/InfinityBotList.ts @@ -3,12 +3,12 @@ import { IDResolvable, Util } from '../../Utils/Util' /** * Represents the Infinity Bot List service. - * @see https://api.infinitybotlist.com/docs + * @see https://spider.infinitybots.gg/docs */ export default class InfinityBotList extends Service { /** The values that can be used to select the service. */ static get aliases() { - return ['infinitybotlist', 'infinitybotlist.com'] + return ['infinitybotlist', 'infinitybotlist.com', 'infinitybots', 'infinitybots.gg'] } /** The logo URL. */ @@ -23,12 +23,12 @@ export default class InfinityBotList extends Service { /** The website URL. */ static get websiteURL() { - return 'https://infinitybotlist.com/' + return 'https://infinitybots.gg/' } /** The base URL of the service's API. */ static get baseURL() { - return 'https://api.infinitybotlist.com' + return 'https://spider.infinitybots.gg' } /** @@ -68,7 +68,7 @@ export default class InfinityBotList extends Service { /** Gets a list of all bots on this service. */ getBots() { return this._request({ - url: '/bots/all' + url: '/bots/@all' }) } @@ -78,28 +78,7 @@ export default class InfinityBotList extends Service { */ getUser(id: IDResolvable) { return this._request({ - url: `/user/${Util.resolveID(id)}` - }) - } - - /** - * Check's whether a user is part of the staff. - * @param id The user's ID. - */ - checkStaff(id: IDResolvable) { - return this._request({ - url: `staff/check/${Util.resolveID(id)}` - }) - } - - /** - * Checks whether a user has voted for the bot. - * @param botId The bot's ID. - * @param userId The user's ID. - */ - userVoted(botId: IDResolvable, userId: IDResolvable) { - return this._request({ - url: `/votes/${Util.resolveID(botId)}/${Util.resolveID(userId)}` + url: `/users/${Util.resolveID(id)}` }) } } diff --git a/src/Interface/Lists/Listcord.ts b/src/Interface/Lists/Listcord.ts deleted file mode 100644 index 3bf86358..00000000 --- a/src/Interface/Lists/Listcord.ts +++ /dev/null @@ -1,117 +0,0 @@ -import { Service, ServicePostOptions } from '../Service' -import { Util, IDResolvable } from '../../Utils/Util' - -/** - * Represents the Listcord service. - * @see https://listcord.gg/docs - */ -export default class Listcord extends Service { - /** The values that can be used to select the service. */ - static get aliases() { - return ['listcord', 'listcord.gg'] - } - - /** The logo URL. */ - static get logoURL() { - return 'https://cdn.discordapp.com/avatars/803339251940196383/50e92bb535cf88641ec22756937e6950.webp' - } - - /** Service's name. */ - static get serviceName() { - return 'Listcord' - } - - /** The website URL. */ - static get websiteURL() { - return 'https://listcord.gg/' - } - - /** The base URL of the service's API. */ - static get baseURL() { - return 'https://listcord.gg/api/' - } - - /** - * Posts statistics to this service. - * Shard data posting is not supported for this service. - * @param options The options of the request. - */ - static post(options: ServicePostOptions) { - const { token, clientID, serverCount } = options - return super._post({ - method: 'post', - url: `/bots/${Util.resolveID(clientID)}/stats/`, - headers: { Authorization: token }, - data: { server_count: Util.resolveCount(serverCount) } - }) - } - - /** - * Gets a bot. - * @param id The bot's ID. - */ - getBot(id: IDResolvable) { - return this._request( - { - url: `/bots/${Util.resolveID(id)}`, - headers: { Authorization: this.token } - }, - { requiresToken: true } - ) - } - - /** - * Gets a bot's reviews. - * @param id The bot's ID. - */ - getBotReviews(id: IDResolvable) { - return this._request( - { - url: `/bot/${Util.resolveID(id)}/reviews`, - headers: { Authorization: this.token } - }, - { requiresToken: true } - ) - } - - /** - * Gets whether a user has voted for a bot. - * @param botID The bot's ID. - * @param userID The user's ID. - */ - userVoted(botID: IDResolvable, userID: IDResolvable) { - return this._request( - { - url: `/bot/${Util.resolveID(botID)}/voted`, - headers: { Authorization: this.token }, - params: { user_id: Util.resolveID(userID) } - }, - { requiresToken: true } - ) - } - - /** - * Gets a bot pack. - * @param id The pack's id. - */ - getBotPack(id: string) { - return this._request( - { - url: `/pack/${id}`, - headers: { Authorization: this.token } - }, - { requiresToken: true } - ) - } - - /** Gets all botpacks. */ - getBotPacks() { - return this._request( - { - url: '/packs', - headers: { Authorization: this.token } - }, - { requiresToken: true } - ) - } -} diff --git a/src/Interface/Lists/MotionBotList.ts b/src/Interface/Lists/MotionBotList.ts deleted file mode 100644 index 5e601158..00000000 --- a/src/Interface/Lists/MotionBotList.ts +++ /dev/null @@ -1,90 +0,0 @@ -import { Service, ServicePostOptions } from '../Service' -import { Util, IDResolvable } from '../../Utils/Util' - -/** - * Represents the MotionBotlist service. - * @see https://www.motiondevelopment.top/docs/api/intro - */ -export default class MotionBotlist extends Service { - /** The values that can be used to select the service. */ - static get aliases() { - return [ - 'motion', - 'motiondevelopment', - 'motionbotlist', - 'motiondevelopment.top' - ] - } - - /** The logo URL. */ - static get logoURL() { - return 'https://www.motiondevelopment.top/favicon.ico' - } - - /** Service's name. */ - static get serviceName() { - return 'Motion Botlist' - } - - /** The website URL. */ - static get websiteURL() { - return 'https://www.motiondevelopment.top/bot' - } - - /** The base URL of the service's API. */ - static get baseURL() { - return 'https://www.motiondevelopment.top/api/v1.2' - } - - /** - * Posts statistics to this service. - * Shard data posting is not supported for this service. - * @param options The options of the request. - */ - static post(options: ServicePostOptions) { - const { token, clientID, serverCount } = options - return super._post({ - method: 'put', - url: `/bots/${Util.resolveID(clientID)}/stats`, - headers: { - key: token, - 'Content-Type': 'application/json' - }, - data: { guilds: Util.resolveCount(serverCount) } - }) - } - - /** - * Gets a bot. - * @param id The bot's ID. - */ - getBot(id: IDResolvable) { - return this._request( - { - url: `/bots/${Util.resolveID(id)}`, - headers: { - key: this.token, - 'Content-Type': 'application/json' - } - }, - { requiresToken: true } - ) - } - - /** - * Gets a bot's votes. - * @param id The bot's ID. - */ - getBotVotes(id: IDResolvable) { - return this._request( - { - url: `/bots/${Util.resolveID(id)}/votes`, - headers: { - key: this.token, - 'Content-Type': 'application/json' - } - }, - { requiresToken: true } - ) - } -} diff --git a/src/Interface/Lists/SpaceBotsList.ts b/src/Interface/Lists/SpaceBotsList.ts deleted file mode 100644 index 3f7dc342..00000000 --- a/src/Interface/Lists/SpaceBotsList.ts +++ /dev/null @@ -1,59 +0,0 @@ -import { Service, ServicePostOptions } from '../Service' -import { Util, IDResolvable } from '../../Utils/Util' - -/** - * Represents the Space Bots List service. - * @see https://spacebots.gitbook.io/tutorial-en/ - */ -export default class SpaceBotsList extends Service { - /** The values that can be used to select the service. */ - static get aliases() { - return ['spacebotslist', 'space-bot-list.xyz'] - } - - /** The logo URL. */ - static get logoURL() { - return 'https://cdn.discordapp.com/avatars/546742409409593354/123b9b0a54b45d99627215c7154580af.webp?size=256' - } - - /** Service's name. */ - static get serviceName() { - return 'Space Bots List' - } - - /** The website URL. */ - static get websiteURL() { - return 'https://space-bot-list.xyz/' - } - - /** The base URL of the service's API. */ - static get baseURL() { - return 'https://space-bot-list.xyz/api' - } - - /** - * Posts statistics to this service. - * Shard data posting is not supported for this service. - * @param options The options of the request - */ - static post(options: ServicePostOptions) { - const { token, clientID, serverCount, userCount } = options - return super._post({ - method: 'post', - url: `/bots/${Util.resolveID(clientID)}`, - headers: { Authorization: token }, - data: { - guilds: Util.resolveCount(serverCount), - users: Util.resolveCount(userCount) - } - }) - } - - /** - * Gets the bot listed on this service. - * @param id The bot's ID - */ - getBot(id: IDResolvable) { - return this._request({ url: `/bots/${Util.resolveID(id)}` }) - } -} diff --git a/src/Interface/Lists/TopCord.ts b/src/Interface/Lists/TopCord.ts deleted file mode 100644 index 7ab0cdc2..00000000 --- a/src/Interface/Lists/TopCord.ts +++ /dev/null @@ -1,67 +0,0 @@ -import { Service, ServicePostOptions } from '../Service' -import { Util, IDResolvable } from '../../Utils/Util' - -/** - * Represents the TopCord service. - * @see https://docs.topcord.xyz/#/API - */ -export default class TopCord extends Service { - /** The values that can be used to select the service. */ - static get aliases() { - return ['topcord', 'topcord.xyz'] - } - - /** The logo URL. */ - static get logoURL() { - return 'https://topcord.xyz/icons/TopCord.png' - } - - /** Service's name. */ - static get serviceName() { - return 'TopCord' - } - - /** The website URL. */ - static get websiteURL() { - return 'https://topcord.xyz/' - } - - /** The base URL of the service's API. */ - static get baseURL() { - return 'https://api.topcord.xyz' - } - - /** - * Posts statistics to this service. - * @param options The options of the request - */ - static post(options: ServicePostOptions) { - const { token, clientID, serverCount, shard } = options - return super._post({ - method: 'post', - url: `/bot/${Util.resolveID(clientID)}/stats`, - headers: { Authorization: token }, - data: shard - ? { - guilds: Util.resolveCount(serverCount), - shards: shard.count - } - : { guilds: Util.resolveCount(serverCount) } - }) - } - - /** - * Gets the bot listed on this service. - * @param id The bot's ID - */ - getBot(id: IDResolvable) { - return this._request({ url: `/bot/${Util.resolveID(id)}` }) - } - - /** - * Lists every bot on this service. - */ - getBots() { - return this._request({ url: `/bots` }) - } -} diff --git a/src/Interface/Lists/WonderBotList.ts b/src/Interface/Lists/WonderBotList.ts deleted file mode 100644 index 62bbc7a2..00000000 --- a/src/Interface/Lists/WonderBotList.ts +++ /dev/null @@ -1,82 +0,0 @@ -import { Service, ServicePostOptions } from '../Service' -import { Util, IDResolvable } from '../../Utils/Util' - -/** - * Represents the Wonder Bot List service. - * @see https://api.wonderbotlist.com/en/ - */ -export default class WonderBotList extends Service { - /** The values that can be used to select the service. */ - static get aliases() { - return ['wonderbotlist', 'wonderbotlist.com'] - } - - /** The logo URL. */ - static get logoURL() { - return 'https://get.snaz.in/8Jk3EJg.png' - } - - /** Service's name. */ - static get serviceName() { - return 'Wonder Bot List' - } - - /** The website URL. */ - static get websiteURL() { - return 'https://wonderbotlist.com/en' - } - - /** The base URL of the service's API. */ - static get baseURL() { - return 'https://api.wonderbotlist.com/v1' - } - - /** - * Posts statistics to this service. - * @param options The options of the request - */ - static post(options: ServicePostOptions) { - const { token, clientID, serverCount, shard } = options - return super._post({ - method: 'post', - url: `/bot/${Util.resolveID(clientID)}`, - headers: { Authorization: token }, - params: - shard && shard.count - ? { serveurs: Util.resolveCount(serverCount), shard: shard.count } - : { serveurs: Util.resolveCount(serverCount) } - }) - } - - /** - * Gets the bot listed on this service. - * @param id The bot's ID - */ - getBot(id: IDResolvable) { - return this._request( - { - url: `/bot/${Util.resolveID(id)}`, - headers: { Authorization: this.token } - }, - { - requiresToken: true - } - ) - } - - /** - * Gets the user listed on this service. - * @param id The user's ID - */ - getUser(id: IDResolvable) { - return this._request( - { - url: `/user/${Util.resolveID(id)}`, - headers: { Authorization: this.token } - }, - { - requiresToken: true - } - ) - } -}