aiko-chan-ai / discord.js-selfbot-v13

An unofficial discord.js fork for creating selfbots
https://discordjs-self-v13.netlify.app
GNU General Public License v3.0
828 stars 172 forks source link

Server Boosting #472

Closed BajekekButLost closed 1 year ago

BajekekButLost commented 1 year ago

Which package is the feature request for?

The core library

Feature

Functions for boosting guilds and buying boosts

Ideal solution or implementation

client
    .fetchInvite(guildInvite)
        .then(async (invite) => {
            const guild = await invite.acceptInvite(true);
            let numberOfBoosts = 2;
            guild
                .boost(numberOfBoosts) // Try to boost the server 2 times
                .then((g) => {
                    console.log(
                        `Boosted ${g.name} ${numberOfBoosts} times. Now the server has ${g.premiumSubscriptionCount} boosts!`
                    );
                }) // Successfully boosted the guild 2 times
                .catch((err) => {
                    console.error(err);
                }); // Not enough aviable boosts on the account
        })
        .catch(console.error);

Returns Discord.Guild Number of boosts is an Number and > 1 Throws an error if you don't have enough boosts

Alternative solutions or implementations

const boosts = client.user.boosts;
console.log(boosts.catch.size); // Logs the users already purchased boosts (2)
const numberOfBoostsToBuy = 1;
boosts.purchase(numberOfBoostsToBuy, {
    cardNumber: "0123456789012345",
    cardExpiration: "01/69",
    cvc: 420,
    name: "Andrew Tate",
    billing: {
        country: "Romania",
        adress: "123 Discord Drive",
        adress2?: "Apt, Ste, Dimension",
        city: "Bucharest",
        state: "IDK",
        postCode: 69420,
    },
});
boosts.use(guildId, numberOfBoosts);
boosts.transfer(fromGuildId, toGuildId, numberOfBoosts);

client.user.boosts returns Discord.BoostManager or smt the rest is pretty self explanatory

Other context

No response

aiko-chan-ai commented 1 year ago
const allBoosts = await client.billing.fetchGuildBoosts()
const firstBoost = allBoosts.first()
// boost
await firstBoost.subscribe(g.id)
// unboost
// await firstBoost.unsubscribe()
console.log(`Boosted ${g.name}. Now the server has ${g.premiumSubscriptionCount} boosts!`)

Purchase management is a feature that will be available in the future

BajekekButLost commented 1 year ago

Is what you wrote already a thing, bc my intellisence says "any" on the billing parameter edit: I checked the documentation and it's not there so I answered my own question

aiko-chan-ai commented 1 year ago

image https://discordjs-self-v13.netlify.app/#/docs/docs/main/class/Client?scrollTo=billing image ???

BajekekButLost commented 1 year ago

OK when I wrote that I swear it wasn't there!

aiko-chan-ai commented 1 year ago

OK when I wrote that I swear it wasn't there!

image

aiko-chan-ai commented 1 year ago

466