Premium tier 0 SKU from staging
This commit is contained in:
parent
ec6666edee
commit
e7a6be0639
@ -4,143 +4,298 @@ import { route } from "@fosscord/api";
|
|||||||
const router: Router = Router();
|
const router: Router = Router();
|
||||||
|
|
||||||
const skus = new Map([
|
const skus = new Map([
|
||||||
[
|
|
||||||
"978380684370378762",
|
|
||||||
[
|
|
||||||
{
|
|
||||||
id: "978380692553465866",
|
|
||||||
name: "Nitro Lite Monthly",
|
|
||||||
interval: 1,
|
|
||||||
interval_count: 1,
|
|
||||||
tag_inclusive: true,
|
|
||||||
sku_id: "978380684370378762",
|
|
||||||
currency: "usd",
|
|
||||||
price: 0,
|
|
||||||
price_tier: null,
|
|
||||||
},
|
|
||||||
],
|
|
||||||
],
|
|
||||||
[
|
[
|
||||||
"521842865731534868",
|
"521842865731534868",
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
id: "511651856145973248",
|
id: "511651856145973248",
|
||||||
name: "Premium Monthly (Legacy)",
|
name: "Individual Premium Tier 3 Monthly (Legacy)",
|
||||||
interval: 1,
|
interval: 1,
|
||||||
interval_count: 1,
|
interval_count: 1,
|
||||||
tax_inclusive: true,
|
tax_inclusive: true,
|
||||||
sku_id: "521842865731534868",
|
sku_id: "521842865731534868",
|
||||||
currency: "usd",
|
currency: "eur",
|
||||||
price: 0,
|
price: 0,
|
||||||
price_tier: null,
|
price_tier: null
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: "511651860671627264",
|
id: "511651860671627264",
|
||||||
name: "Premium Yearly (Legacy)",
|
name: "Individiual Premium Tier 3 Yearly (Legacy)",
|
||||||
interval: 2,
|
interval: 2,
|
||||||
interval_count: 1,
|
interval_count: 1,
|
||||||
tax_inclusive: true,
|
tax_inclusive: true,
|
||||||
sku_id: "521842865731534868",
|
sku_id: "521842865731534868",
|
||||||
currency: "usd",
|
currency: "eur",
|
||||||
price: 0,
|
price: 0,
|
||||||
price_tier: null,
|
price_tier: null
|
||||||
},
|
}
|
||||||
],
|
]
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
"521846918637420545",
|
"521846918637420545",
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
id: "511651871736201216",
|
id: "511651871736201216",
|
||||||
name: "Premium Classic Monthly",
|
name: "Individual Premium Tier 2 Monthly",
|
||||||
interval: 1,
|
interval: 1,
|
||||||
interval_count: 1,
|
interval_count: 1,
|
||||||
tax_inclusive: true,
|
tax_inclusive: true,
|
||||||
sku_id: "521846918637420545",
|
sku_id: "521846918637420545",
|
||||||
currency: "usd",
|
currency: "eur",
|
||||||
price: 0,
|
price: 0,
|
||||||
price_tier: null,
|
price_tier: null
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: "511651876987469824",
|
id: "511651876987469824",
|
||||||
name: "Premium Classic Yearly",
|
name: "Individual Premum Tier 2 Yearly",
|
||||||
interval: 2,
|
interval: 2,
|
||||||
interval_count: 1,
|
interval_count: 1,
|
||||||
tax_inclusive: true,
|
tax_inclusive: true,
|
||||||
sku_id: "521846918637420545",
|
sku_id: "521846918637420545",
|
||||||
currency: "usd",
|
currency: "eur",
|
||||||
price: 0,
|
price: 0,
|
||||||
price_tier: null,
|
price_tier: null
|
||||||
},
|
},
|
||||||
],
|
{
|
||||||
|
id: "978380684370378761",
|
||||||
|
name: "Individual Premum Tier 1",
|
||||||
|
interval: 2,
|
||||||
|
interval_count: 1,
|
||||||
|
tax_inclusive: true,
|
||||||
|
sku_id: "521846918637420545",
|
||||||
|
currency: "eur",
|
||||||
|
price: 0,
|
||||||
|
price_tier: null
|
||||||
|
}
|
||||||
|
]
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
"521847234246082599",
|
"521847234246082599",
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
id: "642251038925127690",
|
id: "642251038925127690",
|
||||||
name: "Premium Quarterly",
|
name: "Individual Premium Tier 3 Quarterly",
|
||||||
interval: 1,
|
interval: 1,
|
||||||
interval_count: 3,
|
interval_count: 3,
|
||||||
tax_inclusive: true,
|
tax_inclusive: true,
|
||||||
sku_id: "521847234246082599",
|
sku_id: "521847234246082599",
|
||||||
currency: "usd",
|
currency: "eur",
|
||||||
price: 0,
|
price: 0,
|
||||||
price_tier: null,
|
price_tier: null
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: "511651880837840896",
|
id: "511651880837840896",
|
||||||
name: "Premium Monthly",
|
name: "Individual Premium Tier 3 Monthly",
|
||||||
interval: 1,
|
interval: 1,
|
||||||
interval_count: 1,
|
interval_count: 1,
|
||||||
tax_inclusive: true,
|
tax_inclusive: true,
|
||||||
sku_id: "521847234246082599",
|
sku_id: "521847234246082599",
|
||||||
currency: "usd",
|
currency: "eur",
|
||||||
price: 0,
|
price: 0,
|
||||||
price_tier: null,
|
price_tier: null
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: "511651885459963904",
|
id: "511651885459963904",
|
||||||
name: "Premium Yearly",
|
name: "Individual Premium Tier 3 Yearly",
|
||||||
interval: 2,
|
interval: 2,
|
||||||
interval_count: 1,
|
interval_count: 1,
|
||||||
tax_inclusive: true,
|
tax_inclusive: true,
|
||||||
sku_id: "521847234246082599",
|
sku_id: "521847234246082599",
|
||||||
currency: "usd",
|
currency: "eur",
|
||||||
price: 0,
|
price: 0,
|
||||||
price_tier: null,
|
price_tier: null
|
||||||
},
|
}
|
||||||
],
|
]
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
"590663762298667008",
|
"590663762298667008",
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
id: "590665532894740483",
|
id: "590665532894740483",
|
||||||
name: "Server Boost Monthly",
|
name: "Crowd Premium Monthly",
|
||||||
interval: 1,
|
interval: 1,
|
||||||
interval_count: 1,
|
interval_count: 1,
|
||||||
tax_inclusive: true,
|
tax_inclusive: true,
|
||||||
sku_id: "590663762298667008",
|
sku_id: "590663762298667008",
|
||||||
discount_price: 0,
|
discount_price: 0,
|
||||||
currency: "usd",
|
currency: "eur",
|
||||||
price: 0,
|
price: 0,
|
||||||
price_tier: null,
|
price_tier: null
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: "590665538238152709",
|
id: "590665538238152709",
|
||||||
name: "Server Boost Yearly",
|
name: "Crowd Premium Yearly",
|
||||||
interval: 2,
|
interval: 2,
|
||||||
interval_count: 1,
|
interval_count: 1,
|
||||||
tax_inclusive: true,
|
tax_inclusive: true,
|
||||||
sku_id: "590663762298667008",
|
sku_id: "590663762298667008",
|
||||||
discount_price: 0,
|
discount_price: 0,
|
||||||
currency: "usd",
|
currency: "eur",
|
||||||
price: 0,
|
price: 0,
|
||||||
price_tier: null,
|
price_tier: null
|
||||||
},
|
}
|
||||||
],
|
]
|
||||||
],
|
],
|
||||||
|
[
|
||||||
|
"978380684370378762",
|
||||||
|
[
|
||||||
|
[
|
||||||
|
{
|
||||||
|
id: "978380692553465866",
|
||||||
|
name: "Premium Tier 0 Monthly",
|
||||||
|
interval: 1,
|
||||||
|
interval_count: 1,
|
||||||
|
tax_inclusive: true,
|
||||||
|
sku_id: "978380684370378762",
|
||||||
|
currency: "usd",
|
||||||
|
price: 299,
|
||||||
|
price_tier: null,
|
||||||
|
prices: {
|
||||||
|
"0": {
|
||||||
|
country_prices: {
|
||||||
|
country_code: "US",
|
||||||
|
prices: [
|
||||||
|
{
|
||||||
|
currency: "usd",
|
||||||
|
amount: 0,
|
||||||
|
exponent: 2
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
payment_source_prices: {
|
||||||
|
"775487223059316758": [
|
||||||
|
{
|
||||||
|
currency: "usd",
|
||||||
|
amount: 0,
|
||||||
|
exponent: 2
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"736345864146255982": [
|
||||||
|
{
|
||||||
|
currency: "usd",
|
||||||
|
amount: 0,
|
||||||
|
exponent: 2
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"683074999590060249": [
|
||||||
|
{
|
||||||
|
currency: "usd",
|
||||||
|
amount: 0,
|
||||||
|
exponent: 2
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"3": {
|
||||||
|
country_prices: {
|
||||||
|
country_code: "US",
|
||||||
|
prices: [
|
||||||
|
{
|
||||||
|
currency: "usd",
|
||||||
|
amount: 0,
|
||||||
|
exponent: 2
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
payment_source_prices: {
|
||||||
|
"775487223059316758": [
|
||||||
|
{
|
||||||
|
currency: "usd",
|
||||||
|
amount: 0,
|
||||||
|
exponent: 2
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"736345864146255982": [
|
||||||
|
{
|
||||||
|
currency: "usd",
|
||||||
|
amount: 0,
|
||||||
|
exponent: 2
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"683074999590060249": [
|
||||||
|
{
|
||||||
|
currency: "usd",
|
||||||
|
amount: 0,
|
||||||
|
exponent: 2
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"4": {
|
||||||
|
country_prices: {
|
||||||
|
country_code: "US",
|
||||||
|
prices: [
|
||||||
|
{
|
||||||
|
currency: "usd",
|
||||||
|
amount: 0,
|
||||||
|
exponent: 2
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
payment_source_prices: {
|
||||||
|
"775487223059316758": [
|
||||||
|
{
|
||||||
|
currency: "usd",
|
||||||
|
amount: 0,
|
||||||
|
exponent: 2
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"736345864146255982": [
|
||||||
|
{
|
||||||
|
currency: "usd",
|
||||||
|
amount: 0,
|
||||||
|
exponent: 2
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"683074999590060249": [
|
||||||
|
{
|
||||||
|
currency: "usd",
|
||||||
|
amount: 0,
|
||||||
|
exponent: 2
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"1": {
|
||||||
|
country_prices: {
|
||||||
|
country_code: "US",
|
||||||
|
prices: [
|
||||||
|
{
|
||||||
|
currency: "usd",
|
||||||
|
amount: 0,
|
||||||
|
exponent: 2
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
payment_source_prices: {
|
||||||
|
"775487223059316758": [
|
||||||
|
{
|
||||||
|
currency: "usd",
|
||||||
|
amount: 0,
|
||||||
|
exponent: 2
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"736345864146255982": [
|
||||||
|
{
|
||||||
|
currency: "usd",
|
||||||
|
amount: 0,
|
||||||
|
exponent: 2
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"683074999590060249": [
|
||||||
|
{
|
||||||
|
currency: "usd",
|
||||||
|
amount: 0,
|
||||||
|
exponent: 2
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
]
|
||||||
|
]
|
||||||
]);
|
]);
|
||||||
|
|
||||||
router.get("/", route({}), async (req: Request, res: Response) => {
|
router.get("/", route({}), async (req: Request, res: Response) => {
|
||||||
|
@ -31,35 +31,6 @@ async function main() {
|
|||||||
await initDatabase();
|
await initDatabase();
|
||||||
await Config.init();
|
await Config.init();
|
||||||
await BannedWords.init();
|
await BannedWords.init();
|
||||||
// // only set endpointPublic, if not already set
|
|
||||||
// await Config.set({
|
|
||||||
// cdn: {
|
|
||||||
// endpointClient: "${location.host}",
|
|
||||||
// endpointPrivate: `http://localhost:${port}`,
|
|
||||||
// },
|
|
||||||
// gateway: {
|
|
||||||
// endpointClient:
|
|
||||||
// '${location.protocol === "https:" ? "wss://" : "ws://"}${location.host}',
|
|
||||||
// endpointPrivate: `ws://localhost:${port}`,
|
|
||||||
// ...(!Config.get().gateway.endpointPublic && {
|
|
||||||
// endpointPublic: `ws://localhost:${port}`,
|
|
||||||
// }),
|
|
||||||
// },
|
|
||||||
// regions: {
|
|
||||||
// default: "fosscord",
|
|
||||||
// useDefaultAsOptimal: true,
|
|
||||||
// available: [
|
|
||||||
// {
|
|
||||||
// id: "fosscord",
|
|
||||||
// name: "Fosscord",
|
|
||||||
// endpoint: "slowcord.maddy.k.vu:3004",
|
|
||||||
// vip: false,
|
|
||||||
// custom: false,
|
|
||||||
// deprecated: false,
|
|
||||||
// },
|
|
||||||
// ],
|
|
||||||
// },
|
|
||||||
// } as any);
|
|
||||||
|
|
||||||
//Sentry
|
//Sentry
|
||||||
if (Config.get().sentry.enabled) {
|
if (Config.get().sentry.enabled) {
|
||||||
|
@ -37,6 +37,7 @@ import { Recipient } from "@fosscord/util";
|
|||||||
|
|
||||||
export async function onIdentify(this: WebSocket, data: Payload) {
|
export async function onIdentify(this: WebSocket, data: Payload) {
|
||||||
clearTimeout(this.readyTimeout);
|
clearTimeout(this.readyTimeout);
|
||||||
|
// TODO: is this needed now that we use `json-bigint`?
|
||||||
if (typeof data.d?.client_state?.highest_last_message_id === "number")
|
if (typeof data.d?.client_state?.highest_last_message_id === "number")
|
||||||
data.d.client_state.highest_last_message_id += "";
|
data.d.client_state.highest_last_message_id += "";
|
||||||
check.call(this, IdentifySchema, data.d);
|
check.call(this, IdentifySchema, data.d);
|
||||||
|
@ -62,7 +62,7 @@ export async function onVoiceStateUpdate(this: WebSocket, data: Payload) {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
// 'Fix' for this one voice state error
|
// 'Fix' for this one voice state error. TODO: Find out why this is sent
|
||||||
if (!voiceState.guild_id) return;
|
if (!voiceState.guild_id) return;
|
||||||
|
|
||||||
//TODO the member should only have these properties: hoisted_role, deaf, joined_at, mute, roles, user
|
//TODO the member should only have these properties: hoisted_role, deaf, joined_at, mute, roles, user
|
||||||
|
Loading…
x
Reference in New Issue
Block a user