diff --git a/docs/general/services.md b/docs/general/services.md index 3821fefb..88c50aab 100644 --- a/docs/general/services.md +++ b/docs/general/services.md @@ -2,28 +2,17 @@
-
-
-
+
-
-
@@ -132,19 +107,6 @@ Class: [DiscordBotlistEU](/#/docs/main/$$$ref/class/DiscordBotlistEU)
Website: https://discord-botlist.eu/
-
-
@@ -201,7 +163,7 @@ Website: https://discordlist.space
-
+
+
+
@@ -277,6 +254,34 @@ Class: [InfinityBotList](/#/docs/main/$$$ref/class/InfinityBotList)
Website: https://infinitybotlist.com/
+
+
+
+
diff --git a/src/Interface/ListIndex.ts b/src/Interface/ListIndex.ts
index ca83f52f..90091c17 100644
--- a/src/Interface/ListIndex.ts
+++ b/src/Interface/ListIndex.ts
@@ -2,27 +2,27 @@
//
// This section is automatically generated by the 'build:source' script, any change will be overwritten
-import AstroBotList from './Lists/AstroBotList'
-import BladeBotList from './Lists/BladeBotList'
+import BladeList from './Lists/BladeList'
import Blist from './Lists/Blist'
-import BotsForDiscord from './Lists/BotsForDiscord'
import BotsOnDiscord from './Lists/BotsOnDiscord'
import Carbon from './Lists/Carbon'
import DBots from './Lists/DBots'
import DiscordBoats from './Lists/DiscordBoats'
import DiscordBotList from './Lists/DiscordBotList'
import DiscordBotlistEU from './Lists/DiscordBotlistEU'
-import DiscordBotsCo from './Lists/DiscordBotsCo'
import DiscordBotsGG from './Lists/DiscordBotsGG'
import DiscordExtremeList from './Lists/DiscordExtremeList'
import DiscordLabs from './Lists/DiscordLabs'
import DiscordListology from './Lists/DiscordListology'
import DiscordListSpace from './Lists/DiscordListSpace'
+import DiscordsCom from './Lists/DiscordsCom'
import DiscordServices from './Lists/DiscordServices'
import Disforge from './Lists/Disforge'
import FatesList from './Lists/FatesList'
import GlennBotList from './Lists/GlennBotList'
import InfinityBotList from './Lists/InfinityBotList'
+import Listcord from './Lists/Listcord'
+import MotionBotList from './Lists/MotionBotList'
import SpaceBotsList from './Lists/SpaceBotsList'
import TopCord from './Lists/TopCord'
import TopGG from './Lists/TopGG'
@@ -32,15 +32,12 @@ import YABL from './Lists/YABL'
// prettier-ignore
export const serviceList = {
- 'astrobotlist': AstroBotList,
- 'botlists.com': AstroBotList,
- 'bladebotlist': BladeBotList,
- 'bladebotlist.xyz': BladeBotList,
+ 'bladebotlist': BladeList,
+ 'bladebotlist.xyz': BladeList,
+ 'bladelist': BladeList,
+ 'bladelist.gg': BladeList,
'blist': Blist,
'blist.xyz': Blist,
- 'botsfordiscord': BotsForDiscord,
- 'botsfordiscord.com': BotsForDiscord,
- 'discords': BotsForDiscord,
'botsondiscord': BotsOnDiscord,
'bots.ondiscord.xyz': BotsOnDiscord,
'carbonitex': Carbon,
@@ -54,8 +51,6 @@ export const serviceList = {
'discordbotlist.com': DiscordBotList,
'dbleu': DiscordBotlistEU,
'discordbotlisteu': DiscordBotlistEU,
- 'discordbotsco': DiscordBotsCo,
- 'discordbots.co': DiscordBotsCo,
'discordbotsgg': DiscordBotsGG,
'discord.bots.gg': DiscordBotsGG,
'discordextremelist': DiscordExtremeList,
@@ -68,6 +63,10 @@ export const serviceList = {
'discordlist.space': DiscordListSpace,
'botlistspace': DiscordListSpace,
'botlist.space': DiscordListSpace,
+ 'botsfordiscord': DiscordsCom,
+ 'botsfordiscord.com': DiscordsCom,
+ 'discords': DiscordsCom,
+ 'discords.com': DiscordsCom,
'discordservices': DiscordServices,
'discordservices.net': DiscordServices,
'disforge': Disforge,
@@ -78,6 +77,12 @@ export const serviceList = {
'glennbotlist.xyz': GlennBotList,
'infinitybotlist': InfinityBotList,
'infinitybotlist.com': InfinityBotList,
+ 'listcord': Listcord,
+ 'listcord.gg': Listcord,
+ 'motion': MotionBotList,
+ 'motiondevelopment': MotionBotList,
+ 'motionbotlist': MotionBotList,
+ 'motiondevelopment.top': MotionBotList,
'spacebotslist': SpaceBotsList,
'space-bot-list.xyz': SpaceBotsList,
'topcord': TopCord,
diff --git a/src/Interface/Lists/AstroBotList.ts b/src/Interface/Lists/AstroBotList.ts
deleted file mode 100644
index 5fbeddd5..00000000
--- a/src/Interface/Lists/AstroBotList.ts
+++ /dev/null
@@ -1,62 +0,0 @@
-import { Service, ServicePostOptions } from '../Service'
-import { Util } from '../../Utils/Util'
-
-/**
- * Represents the Astro Bot List service.
- * @see https://botlists.com/api/docs
- */
-export default class AstroBotList extends Service {
- /** The values that can be used to select the service. */
- static get aliases() {
- return ['astrobotlist', 'botlists.com']
- }
-
- /** The logo URL. */
- static get logoURL() {
- return 'https://cdn.bot-list.xyz/7364djcas.png'
- }
-
- /** Service's name. */
- static get serviceName() {
- return 'Astro Bot List'
- }
-
- /** The website URL. */
- static get websiteURL() {
- return 'https://botlists.com'
- }
-
- /** The base URL of the service's API. */
- static get baseURL() {
- return 'https://botlists.com/api'
- }
-
- /**
- * Posts statistics to this service.
- * @param options The options of the request
- */
- static post(options: ServicePostOptions) {
- const { token, serverCount } = options
- return super._post({
- method: 'post',
- url: '/bot',
- headers: { token },
- data: {
- guild_count: Util.resolveCount(serverCount)
- }
- })
- }
-
- /** Gets the stats of this bot. */
- getOwnStats() {
- return this._request(
- {
- url: '/bot',
- headers: { token: this.token }
- },
- {
- requiresToken: true
- }
- )
- }
-}
diff --git a/src/Interface/Lists/BladeBotList.ts b/src/Interface/Lists/BladeBotList.ts
deleted file mode 100644
index 57dcdbf4..00000000
--- a/src/Interface/Lists/BladeBotList.ts
+++ /dev/null
@@ -1,71 +0,0 @@
-import { Service, ServicePostOptions } from '../Service'
-import { Util, IDResolvable } from '../../Utils/Util'
-
-/**
- * Represents the BladeBotList service.
- * @see https://docs.bladebotlist.xyz/api/introduction.html
- */
-export default class BladeBotList extends Service {
- /** The values that can be used to select the service. */
- static get aliases() {
- return ['bladebotlist', 'bladebotlist.xyz']
- }
-
- /** The logo URL. */
- static get logoURL() {
- return 'https://bladebotlist.xyz/img/logo.svg'
- }
-
- /** Service's name. */
- static get serviceName() {
- return 'BladeBotList'
- }
-
- /** The website URL. */
- static get websiteURL() {
- return 'https://bladebotlist.xyz'
- }
-
- /** The base URL of the service's API. */
- static get baseURL() {
- return 'https://bladebotlist.xyz/api/'
- }
-
- /**
- * 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
- ? {
- server_count: Util.resolveCount(serverCount),
- shard_count: shard.count
- }
- : { 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: `/bots/${Util.resolveID(id)}` })
- }
-
- /**
- * Checks whether a user has given a vote to the bot
- * @param botId The bot's ID
- * @param userID The user's ID
- */
- userVoted(botId: IDResolvable, userID: IDResolvable) {
- return this._request({
- url: `/bots/${Util.resolveID(botId)}/votes/${Util.resolveID(userID)}`
- })
- }
-}
diff --git a/src/Interface/Lists/DiscordBotsCo.ts b/src/Interface/Lists/BladeList.ts
similarity index 50%
rename from src/Interface/Lists/DiscordBotsCo.ts
rename to src/Interface/Lists/BladeList.ts
index 52a0cb4d..24fe8383 100644
--- a/src/Interface/Lists/DiscordBotsCo.ts
+++ b/src/Interface/Lists/BladeList.ts
@@ -2,70 +2,66 @@ import { Service, ServicePostOptions } from '../Service'
import { Util, IDResolvable } from '../../Utils/Util'
/**
- * Represents the DiscordBots.co service.
- * @see https://discordbots.co/api-information
+ * Represents the BladeList service.
+ * @see https://docs.bladelist.gg/en/latest/api/index.html
*/
-export default class DiscordBotsCo extends Service {
+export default class BladeList extends Service {
/** The values that can be used to select the service. */
static get aliases() {
- return ['discordbotsco', 'discordbots.co']
+ return ['bladebotlist', 'bladebotlist.xyz', 'bladelist', 'bladelist.gg']
}
/** The logo URL. */
static get logoURL() {
- return 'https://cdn.discordapp.com/avatars/688927563409522694/17cfd572fd3e2d3285534c12e0f58422.png'
+ return 'https://bladelist.gg/static/img/logo.png'
}
/** Service's name. */
static get serviceName() {
- return 'DiscordBots.co'
+ return 'BladeList'
}
/** The website URL. */
static get websiteURL() {
- return 'https://discordbots.co'
+ return 'https://bladelist.gg'
}
/** The base URL of the service's API. */
static get baseURL() {
- return 'https://api.discordbots.co/v1/public'
+ return 'https://api.bladelist.gg'
}
/**
* Posts statistics to this service.
- * @param options The options of the request
+ * @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`,
+ method: 'put',
+ url: `/bots/${Util.resolveID(clientID)}/`,
headers: {
Authorization: token,
'Content-Type': 'application/json'
},
- data: shard
- ? {
- serverCount: Util.resolveCount(serverCount),
- shardCount: shard.count
- }
- : { serverCount: Util.resolveCount(serverCount) }
+ data: {
+ server_count: Util.resolveCount(serverCount),
+ ...(shard ? { shard_count: shard.count } : {})
+ }
})
}
/**
- * Gets the bot listed on this service.
- * @param id The bot's ID
+ * Gets a bot listed on this service.
+ * @param id The bot's ID.
*/
getBot(id: IDResolvable) {
return this._request(
{
- url: `/bot/${Util.resolveID(id)}`,
+ url: `/bots/${Util.resolveID(id)}`,
headers: { Authorization: this.token }
},
- {
- requiresToken: true
- }
+ { requiresToken: true }
)
}
}
diff --git a/src/Interface/Lists/DiscordLabs.ts b/src/Interface/Lists/DiscordLabs.ts
index 89d8c3e8..179d2228 100644
--- a/src/Interface/Lists/DiscordLabs.ts
+++ b/src/Interface/Lists/DiscordLabs.ts
@@ -60,4 +60,12 @@ export default class DiscordLabs extends Service {
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
index 1bc76520..2a46e9d7 100644
--- a/src/Interface/Lists/DiscordListSpace.ts
+++ b/src/Interface/Lists/DiscordListSpace.ts
@@ -1,5 +1,5 @@
import { Service, ServicePostOptions } from '../Service'
-import { Util, CountResolvable, IDResolvable } from '../../Utils/Util'
+import { Util, IDResolvable } from '../../Utils/Util'
import { Query } from '../../Utils/Constants'
/**
@@ -34,7 +34,7 @@ export default class DiscordListSpace extends Service {
/** The base URL of the service's API. */
static get baseURL() {
- return 'https://api.discordlist.space/v1'
+ return 'https://api.discordlist.space/v2'
}
/**
@@ -47,7 +47,7 @@ export default class DiscordListSpace extends Service {
return super._post({
method: 'post',
url: `/bots/${Util.resolveID(clientID)}`,
- headers: { Authorization: token },
+ headers: { Authorization: token, 'Content-Type': 'application/json' },
data: { server_count: Util.resolveCount(serverCount) }
})
}
@@ -57,19 +57,69 @@ export default class DiscordListSpace extends Service {
return this._request({ url: '/statistics' })
}
- /** Gets a list of bots on this service. */
- getBots() {
- return this._request({ url: '/bots' })
+ /**
+ * 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 the bot listed on this service. */
+ /**
+ * 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
+ * @param id The bot's ID.
*/
getBotVotes(id: IDResolvable) {
return this._request(
@@ -84,16 +134,65 @@ export default class DiscordListSpace extends Service {
}
/**
- * Gets the uptime of a bot listed on this service.
- * @param id The bot's ID
+ * Checks if a specific user has upvoted the bot.
+ * @param botID The bot's ID.
+ * @param userID The user's ID.
*/
- getBotUptime(id: IDResolvable) {
- return this._request({ url: `/bots/${Util.resolveID(id)}/uptime` })
+ 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
+ * @param id The user's ID.
*/
getUser(id: IDResolvable) {
return this._request({ url: `/users/${Util.resolveID(id)}` })
@@ -101,29 +200,24 @@ export default class DiscordListSpace extends Service {
/**
* Gets the user's bots listed for this service.
- * @param id The user's ID
+ * @param id The user's ID.
*/
getUserBots(id: IDResolvable) {
- return this._request({ url: `/users/${Util.resolveID(id)}/bots` })
+ return this._request({
+ url: `/users/${Util.resolveID(id)}/bots`,
+ headers: { Authorization: this.token }
+ })
}
/**
- * Gets the widget URL for this bot.
- * @param id The bot's ID
- * @param style The style of the widget, cannot be zero
- * @param query The query string that will be used in the request
+ * Get all the lists that a user owns.
+ * @param id The user's ID.
+ * @param query The query to use in the request.
*/
- getWidgetURL(
- id: IDResolvable,
- style: CountResolvable = 1,
- query: Query = {}
- ) {
- return this._appendQuery(
- `https://api.botlist.space/widget/${Util.resolveID(
- id
- )}/${Util.resolveCount(style)}`,
- query,
- false
- )
+ 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
index f68148fa..167d24ff 100644
--- a/src/Interface/Lists/DiscordListology.ts
+++ b/src/Interface/Lists/DiscordListology.ts
@@ -13,7 +13,7 @@ export default class DiscordListology extends Service {
/** The logo URL. */
static get logoURL() {
- return 'https://discordlistology.com/idiscord.png'
+ return 'https://i.imgur.com/DmSCuSk.png'
}
/** Service's name. */
diff --git a/src/Interface/Lists/BotsForDiscord.ts b/src/Interface/Lists/DiscordsCom.ts
similarity index 62%
rename from src/Interface/Lists/BotsForDiscord.ts
rename to src/Interface/Lists/DiscordsCom.ts
index d66baf13..d5dcef04 100644
--- a/src/Interface/Lists/BotsForDiscord.ts
+++ b/src/Interface/Lists/DiscordsCom.ts
@@ -3,13 +3,13 @@ import { Util, IDResolvable } from '../../Utils/Util'
import { Query } from '../../Utils/Constants'
/**
- * Represents the Bots For Discord service.
+ * Represents the Discords.com service (formerly Bots For Discord).
* @see https://docs.botsfordiscord.com/
*/
-export default class BotsForDiscord extends Service {
+export default class DiscordsCom extends Service {
/** The values that can be used to select the service. */
static get aliases() {
- return ['botsfordiscord', 'botsfordiscord.com', 'discords']
+ return ['botsfordiscord', 'botsfordiscord.com', 'discords', 'discords.com']
}
/** The logo URL. */
@@ -19,7 +19,7 @@ export default class BotsForDiscord extends Service {
/** Service's name. */
static get serviceName() {
- return 'Bots For Discord'
+ return 'Discords.com'
}
/** The website URL. */
@@ -35,7 +35,7 @@ export default class BotsForDiscord extends Service {
/**
* Posts statistics to this service.
*