mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-22 03:07:04 +02:00
feat: blitz stars links
This commit is contained in:
1 parent
3ec6939bd3
commit
49545bcae0
6 files changed
+61
-9
No files matched your search
@@ -0,0 +1,12 @@
|
||||
import { ButtonBuilder, ButtonStyle } from 'discord.js';
|
||||
import { BlitzServer } from '../../constants/servers.js';
|
||||
|
||||
export default function fullBlitzStarsStats(
|
||||
server: BlitzServer,
|
||||
username: string,
|
||||
) {
|
||||
return new ButtonBuilder()
|
||||
.setLabel('View on BlitzStars')
|
||||
.setURL(`https://www.blitzstars.com/player/${server}/${username}`)
|
||||
.setStyle(ButtonStyle.Link);
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
import { ButtonBuilder, ButtonStyle } from 'discord.js';
|
||||
|
||||
export const supportBlitzStars = new ButtonBuilder()
|
||||
.setLabel('Support BlitzStars')
|
||||
.setURL('https://www.blitzstars.com/supporters')
|
||||
.setStyle(ButtonStyle.Link);
|
||||
@@ -15,7 +15,9 @@ export default async function listAccountsPanServer(search: string, limit = 9) {
|
||||
return (
|
||||
await Promise.all([
|
||||
getWargamingResponse<AccountList>(
|
||||
`https://api.wotblitz.com/wotb/account/list/?application_id=${args['wargaming-application-id']}&search=${search}&limit=${normalizedLimit}`,
|
||||
`https://api.wotblitz.com/wotb/account/list/?application_id=${
|
||||
args['wargaming-application-id']
|
||||
}&search=${encodeURIComponent(search)}&limit=${normalizedLimit}`,
|
||||
).then(
|
||||
(value) =>
|
||||
value &&
|
||||
@@ -25,7 +27,9 @@ export default async function listAccountsPanServer(search: string, limit = 9) {
|
||||
})),
|
||||
),
|
||||
getWargamingResponse<AccountList>(
|
||||
`https://api.wotblitz.eu/wotb/account/list/?application_id=${args['wargaming-application-id']}&search=${search}&limit=${normalizedLimit}`,
|
||||
`https://api.wotblitz.eu/wotb/account/list/?application_id=${
|
||||
args['wargaming-application-id']
|
||||
}&search=${encodeURIComponent(search)}&limit=${normalizedLimit}`,
|
||||
).then(
|
||||
(value) =>
|
||||
value &&
|
||||
@@ -35,7 +39,9 @@ export default async function listAccountsPanServer(search: string, limit = 9) {
|
||||
})),
|
||||
),
|
||||
getWargamingResponse<AccountList>(
|
||||
`https://api.wotblitz.asia/wotb/account/list/?application_id=${args['wargaming-application-id']}&search=${search}&limit=${normalizedLimit}`,
|
||||
`https://api.wotblitz.asia/wotb/account/list/?application_id=${
|
||||
args['wargaming-application-id']
|
||||
}&search=${encodeURIComponent(search)}&limit=${normalizedLimit}`,
|
||||
).then(
|
||||
(value) =>
|
||||
value &&
|
||||
|
||||
Reference in new issue
Block a user