On avance sur le site du Bastion

in LaTaverne3 days ago (edited)

ChatGPT Image 28 avr. 2025, 18_04_52.png

separator3.png

Comme je relance une campagne massive concernant la Principauté, notamment du côté de #DUO, mais pas que, j'alloue une partie de mon temps pour le site web.

J'ai déjà refais en partie la page de garde de https://principalityofbastion.org, mais j'ai également rendu le marché plus autonome dans son reporting puisque dès à présent, chaque mouvement sur le marché MiNaVA (Micro Nation Virtual Assets) est monitoré sur notre discord, sans l'aide de MAKE qui n'arrêtait pas de se mettre en indisponible pour nous faire comprendre que "La vie est plus jolie quand t'es abonné"...

Je vous partage le code avec plaisir:

Dans le code vous trouverez l'adresse d'un webhook, vous devrez créer le votre.

language JavaScript

async function envoyerWebhook({
    typeTransaction,
    categorie,
    detail,
    prix = null,
    token = null,
    vendeur = null,
    acheteur = null,
    envoyeur = null,
    destinataire = null,
    proprietaire = null
}) {
    const webhookUrl = "https://discord.com/api/webhooks/votrepropre/lienwebhook";
    const imageUrl = `https://votresiteweb/${categorie}${detail}.png`;

    let title = "";
    let fields = [];

    switch (typeTransaction) {
        case "Mise en vente":
            title = "💎 Mise en vente d'un NFT";
            fields.push(
                { name: "Prix", value: `${prix} ${token}`, inline: true },
                { name: "Vendeur", value: vendeur, inline: true }
            );
            break;

        case "Achat":
            title = "🛒 Achat d'un NFT";
            fields.push(
                { name: "Prix", value: `${prix} ${token}`, inline: true },
                { name: "Vendeur", value: vendeur, inline: true },
                { name: "Acheteur", value: acheteur, inline: true }
            );
            break;

        case "Transfert":
            title = "🔄 Transfert d'un NFT";
            fields.push(
                { name: "Envoyeur", value: envoyeur, inline: true },
                { name: "Destinataire", value: destinataire, inline: true }
            );
            break;

        case "Annulation de vente":
            title = "🚫 Annulation de vente d'un NFT";
            fields.push(
                { name: "Propriétaire", value: proprietaire, inline: true }
            );
            break;

        default:
            console.error("Type de transaction inconnu");
            return;
    }

    const payload = {
        embeds: [
            {
                title: title,
                description: "Mouvement détecté sur les NFT MiNAVA 🎨",
                color: 0x5865F2, // Un joli bleu Discord
                thumbnail: {
                    url: imageUrl
                },
                fields: fields
            }
        ]
    };

    try {
        const response = await fetch(webhookUrl, {
            method: "POST",
            headers: { "Content-Type": "application/json" },
            body: JSON.stringify(payload)
        });

        if (response.ok) {
            console.log("✅ Message envoyé avec succès !");
        } else {
            console.error(`❌ Erreur : ${response.status}`, await response.text());
        }
    } catch (error) {
        console.error("❌ Erreur d'envoi :", error);
    }
}


Après j'ai simplement du installer un call vers "envoyerwebhook" selon les 4 actions possibles dans le marché : Achat, mise en vente, annulation de vente et transfert...

Comme vous pouvez le voir, c'est assez simple, cela évite d'être dépendant, et cela fonctionne bien :

image.png

Ainsi, si notre campagne atteint son but et que le Bastion rencontre enfin son public, on aura au moins l'information en direct :)

Dans les jours qui suivront, je m'attacherai à terminer la page de garde, ensuite nous verrons pour intégrer le pricing de l'ECU en live, et pourquoi pas tenter d'avoir des outils d'achat vente liés à l'ECU.

J'avance à mon aise... Car de l'autre côté, je planche toujours sur l'activité artistique possible et la recherche d'un emploi en simultané, l'un ou l'autre me conviendrait fort bien...

A demain donc, et belle journée à tous...

Si vous aimez mon travail ou mes projets, n'hésitez pas à visiter notre marché aux NFT :)
Accessible depuis https://www.principalityofbastion.org, ou en direct sur https://nft.bastion.city/Market.html

separator3.png

Best regards,
𝕴𝖙𝖍𝖆𝖗𝖆 𝕲𝖆ï𝖆𝖓≋ Prince of Principality of Bastion
≋≋≋≋≋≋≋≋≋≋≋≋≋≋≋≋≋≋≋≋≋≋≋≋≋≋≋≋≋≋≋≋≋≋≋≋≋≋≋≋
Discord : https://discord.principalityofbastion.org
Website : https://principalityofbastion.org / https://nft.bastion.city
Social Networks: See on our website.

Founder of the Principality of Bastion

Sort:  

C'est bien, ça avance !
!PIZZA
!LOL
!HUG

journalier
!hivebits

florenceboens, you mined 1.0 🟧 HBIT. If you'd replied to another Hive user, the HBIT would be split: 0.9 to you and 0.1 to them as a tip. When you mine HBIT, you're also playing the Wusang: Isle of Blaq game. 🏴‍☠️

Sorry, but you didn't find a bonus treasure token today. Try again tomorrow...they're out there! Your random number was 0.8608501832019156, also viewable in the Discord server, #hbit-wusang-log channel. | tools | wallet | discord | community | daily <><

Check for bonus treasure tokens by entering your username at a block explorer A, explorer B, or take a look at your wallet.
There is a treasure chest of bitcoin sats hidden in Wusang: Isle of Blaq. Happy treasure hunting! 😃 Read about Hivebits (HBIT) or read the story of Wusang: Isle of Blaq.

What do you call a religious ceremony with one person?
Single service.

Credit: reddit
@itharagaian, I sent you an $LOLZ on behalf of florenceboens

(3/10)
Farm LOLZ tokens when you Delegate Hive or Hive Tokens.
Click to delegate: 10 - 20 - 50 - 100 HP

Faut espérer que cela fasse effet aussi, si personne n'utilise ou joue avec les nft, ben ... j'aurai fait tout cela pour rien, mdr
!LOL

I sent my girlfriend a 'Get Better' card.
She's not sick, or anything - I just think she can get better..

Credit: reddit
@florenceboens, I sent you an $LOLZ on behalf of itharagaian

(2/10)
Farm LOLZ tokens when you Delegate Hive or Hive Tokens.
Click to delegate: 10 - 20 - 50 - 100 HP

PIZZA!

$PIZZA slices delivered:
faustine.books tipped itharagaian
hivecurious tipped itharagaian
@itharagaian(1/10) tipped @hivecurious
isiksenpalvoja tipped itharagaian
florenceboens tipped itharagaian

Come get MOONed!

bonne continuation pour la suite.
!PIZZA
!LOL
!HUG

R.I.P. boiled water.
You will be mist.

Credit: reddit
@itharagaian, I sent you an $LOLZ on behalf of isiksenpalvoja

(2/10)
Farm LOLZ tokens when you Delegate Hive or Hive Tokens.
Click to delegate: 10 - 20 - 50 - 100 HP

MErci
!ALIVE

on travaille un peu, puis on se détend un peu ;)
!PIZZA
!LOL
!HUG

I'm in hospital because I drunk a cup of petrol.
That was a very fuelish thing to do.

Credit: reddit
@itharagaian, I sent you an $LOLZ on behalf of faustine.books

(2/10)
Delegate Hive Tokens to Farm $LOLZ and earn 110% Rewards. Learn more.

c'est cela même
!LOL

My house-mate is terrified of negative numbers
He'll stop at nothing to avoid them.

Credit: reddit
@faustine.books, I sent you an $LOLZ on behalf of itharagaian

(3/10)
Farm LOLZ tokens when you Delegate Hive or Hive Tokens.
Click to delegate: 10 - 20 - 50 - 100 HP

!LOLZ
!ALIVE

An atom walks into a bar and says I think I lost an electron in here
Bartender: Are you positive?

Credit: theabsolute
@itharagaian, I sent you an $LOLZ on behalf of gestion.alive

(7/10)
Delegate Hive Tokens to Farm $LOLZ and earn 110% Rewards. Learn more.

!ALIVE

!LOLZ
!ALIVE

!LOLZ

A priest was arrested at a church
He was convicted for mass murder.

Credit: reddit
@itharagaian, I sent you an $LOLZ on behalf of hive-103505

(5/10)
Delegate Hive Tokens to Farm $LOLZ and earn 110% Rewards. Learn more.

!LOL

Why was the banana denied bail?
Every judge knows bananas splits.

Credit: reddit
@hive-103505, I sent you an $LOLZ on behalf of itharagaian

(7/10)
Farm LOLZ tokens when you Delegate Hive or Hive Tokens.
Click to delegate: 10 - 20 - 50 - 100 HP

!PIZZA
!BBH
!INDEED 👍

!INDEED
!PIZZA