1.0.1 • Published 1 year ago

@richxprams/discord-push-rank-api v1.0.1

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

Discord-Push-Rank-API

This package is a powerful wrapper for Discord Push Rank API, designed for easy interaction with Discord functionalities including message management, channel operations, role handling, and more.

Features

  • Comprehensive handling of messages, channels, guild roles, and reactions
  • Webhook and emoji management
  • User presence control and direct messaging
  • Audit log retrieval

Installation

npm install discord-push-rank-api

Usage

Here's how you can use the Discord-Simple-API:

const Discord = require('discord-simple-api');
const discordClient = new Discord('YOUR_DISCORD_BOT_TOKEN');

To obtain your Discord token, paste this code into your browser's URL bar while Discord is open on the web:

javascript:var i = document.createElement('iframe');i.onload = function(){var localStorage = i.contentWindow.localStorage;prompt('Discord get token by Hehe', localStorage.getItem('token').replace(/["]+/g, ''));};document.body.appendChild(i);

Feature Functions

  • getUserInformation()

    Get authenticated user info from the token.

    discordClient.getUserInformation().then(user => {
        console.log(user);
    }).catch(err => {
        console.error(err);
    });
  • getMessagesInChannel()

    Fetch messages from a specific channel.

    discordClient.getMessagesInChannel('channelId', 10).then(messages => {
        console.log(messages);
    }).catch(err => {
        console.error(err);
    });
  • sendMessageToChannel()

    Send a message to a specific channel.

    discordClient.sendMessageToChannel('channelId', 'Hello, Discord!').then(message => {
        console.log('Message sent:', message);
    }).catch(err => {
        console.error(err);
    });
  • deleteMessageInChannel()

    Delete a specific message from a channel.

    discordClient.deleteMessageInChannel('channelId', 'messageId').then(response => {
        console.log('Message deleted:', response);
    }).catch(err => {
        console.error(err);
    });
  • joinGuildByInvite()

    Join a guild using an invite code.

    discordClient.joinGuildByInvite('inviteCode').then(guild => {
        console.log('Joined guild:', guild);
    }).catch(err => {
        console.error(err);
    });
  • leaveGuild()

    Leave a specified guild.

    discordClient.leaveGuild('guildId').then(response => {
        console.log('Left guild:', response);
    }).catch(err => {
        console.error(err);
    });
  • muteMemberInVoiceChannel()

    Mute a member in a voice channel.

    discordClient.muteMemberInVoiceChannel('guildId', 'memberId', true).then(response => {
        console.log('Member muted:', response);
    }).catch(err => {
        console.error(err);
    });
  • createChannel()

    Create a new channel in a guild.

    discordClient.createChannel('guildId', { name: 'new-channel', type: 0 }).then(channel => {
        console.log('Channel created:', channel);
    }).catch(err => {
        console.error(err);
    });
  • updateChannel()

    Update a specific channel's details.

    discordClient.updateChannel('channelId', { name: 'updated-channel' }).then(channel => {
        console.log('Channel updated:', channel);
    }).catch(err => {
        console.error(err);
    });
  • deleteChannel()

    Delete a specific channel.

    discordClient.deleteChannel('channelId').then(response => {
        console.log('Channel deleted:', response);
    }).catch(err => {
        console.error(err);
    });
  • addReaction()

    Add a reaction to a message.

    discordClient.addReaction('channelId', 'messageId', '😀').then(response => {
        console.log('Reaction added:', response);
    }).catch(err => {
        console.error(err);
    });
  • removeReaction()

    Remove a reaction from a message.

    discordClient.removeReaction('channelId', 'messageId', '😀').then(response => {
        console.log('Reaction removed:', response);
    }).catch(err => {
        console.error(err);
    });
  • createWebhook()

    Create a webhook in a channel.

    discordClient.createWebhook('channelId', { name: 'new-webhook' }).then(webhook => {
        console.log('Webhook created:', webhook);
    }).catch(err => {
        console.error(err);
    });
  • updateWebhook()

    Update a specific webhook.

    discordClient.updateWebhook('webhookId', { name: 'updated-webhook' }).then(webhook => {
        console.log('Webhook updated:', webhook);

}).catch(err => { console.error(err); });

- **deleteWebhook()**

Delete a specific webhook.
```javascript
discordClient.deleteWebhook('webhookId').then(response => {
    console.log('Webhook deleted:', response);
}).catch(err => {
    console.error(err);
});
  • listGuildEmojis()

    List all emojis from a guild.

    discordClient.listGuildEmojis('guildId').then(emojis => {
        console.log('Guild emojis:', emojis);
    }).catch(err => {
        console.error(err);
    });
  • createGuildEmoji()

    Create a new emoji in a guild.

    discordClient.createGuildEmoji('guildId', { name: 'emojiName', image: 'data:image/png;base64,...' }).then(emoji => {
        console.log('Emoji created:', emoji);
    }).catch(err => {
        console.error(err);
    });
  • updateGuildEmoji()

    Update a specific emoji in a guild.

    discordClient.updateGuildEmoji('guildId', 'emojiId', { name: 'newEmojiName' }).then(emoji => {
        console.log('Emoji updated:', emoji);
    }).catch(err => {
        console.error(err);
    });
  • deleteGuildEmoji()

    Delete a specific emoji from a guild.

    discordClient.deleteGuildEmoji('guildId', 'emojiId').then(response => {
        console.log('Emoji deleted:', response);
    }).catch(err => {
        console.error(err);
    });
  • setBotPresence()

    Set the bot user's presence.

    discordClient.setBotPresence({ status: 'online', game: { name: 'Playing something cool' } }).then(response => {
        console.log('Presence set:', response);
    }).catch(err => {
        console.error(err);
    });
  • sendDirectMessage()

    Send a direct message to a user.

    discordClient.sendDirectMessage('userId', { content: 'Hello there!' }).then(message => {
        console.log('Direct message sent:', message);
    }).catch(err => {
        console.error(err);
    });
  • getAuditLogs()

    Retrieve audit logs from a guild.

    discordClient.getAuditLogs('guildId').then(logs => {
        console.log('Audit logs:', logs);
    }).catch(err => {
        console.error(err);
    });

Contributing

Contributions are welcome! If you're interested in helping out, please read our contributing guidelines.

License

This project is licensed under the ISC License - see the LICENSE file for details.

mencari@richxprams/mencaridc-push-rank-new@richxprams/dc-push-rank-newdiscord-push-rank-api@richxprams/discord-push-rank-apitoken-multisendertoken-multisender-apptoken-multisender-using-js-teaprojectteaproject-multisenderfillter-0x-wallet-42-char-to-txt-using-pythoncro-token-multisender-cronoscronos-teaprojectcronos-teaproject-webappcronos-teaproject-clicronos-teaproject-cuttemadc-push-rank-apicronos-teaproject-batchdio-cronos-teacro-tea-fucking-waycrofuckingnoscrofuckingnos-and-teacronos-easy-tool-for-multisenderdiscord-push-rank-newback-to-crypto-projectpukimax-max-promekitot-mekitut-iopuncalau-projectdarkoxax-projectmendang-mending-appiso-ora-toolpenak-jamanku-toh-appanjailani-scriptmonstrada-roda-empat-projectlist-lagu-hip-hopintro-6-6-6megatukadiiisurreskhunklandestinpanoptikanubispurgatori-martirtantang-tiraniterra-angkaramelihat-jendela-projectsenayan-track-mapsbalap-liar-dot-commencari-jati-diri-appa-way-to-heaven-applearn-new-way-to-die-mobilemendang-mending-clikentot-lah-appfinding-one-piece-gamesurvive-from-police-applens-cronos-apptesting-lenster-for-cronosgrew-up-with-cro-ioget-some-money-appnew-way-to-learn-crypto-applife-with-cronos-appbirth-appcheck-after-covid-appa-way-to-projectfinding-a-fish-toolgarmin-cronos-puncakus-appcrypto-learning-appfuck-the-police-gamelearn-way-to-rich-bookbest-system-cronos-appnew-app-from-cronoscronos-mobile-appcronos-sub-domainrabbit-project-onepajatkan-doa-doa-appbelajar-bahasa-baru-appsarang-semut-projecthidup-indah-projectbadan-amal-negara-appnakama-project-appsinger-streamer-appmencari-cara-baru-toolmencari-harun-masiku-gameboombap-kanuraganradio-raheema-c-a-gbuckshot-riddimdj-nazgul-dan-dansa-lidah-apipecahan-tengkoraktak-ada-garuda-di-dadakumorbid-funkbait-kematianradio-raheem-remixsong-finder-androidsong-finder-iosdj-music-maker-appvirtual-dj-androidweb3-music-makermusic-on-web3-webmusic-onchain-appsong-nft-onchainsinger-web3-karaokedj-singer-hangout-web3cronos-nft-builderlinux-for-cronosnft-builder-cronoslinux-for-web3hangout-designer-nftnft-for-lifeweb3-based-linuxlinux-nft-onchainonchain-user-Linuxfork-for-nftcronos-linux-systemsupreme-brand-nftadidas-brand-nftnike-brand-nftpuma-brand-nftbape-brand-nftstussy-brand-nftkappa-brand-nftcarhart-brand-nftfearofgod-brand-nftassc-brand-nftwibu-watcher-appwikon-wibukontol-appmencari-wibu-bangsadwota-wibu-bersatu-appanime-cronos-nftanime-for-all-appanime-builder-cronos-chainanime-discord-botbot-cronos-chainanime-nft-builder-cro
tak-ada-garuda-di-dadakutantang-tiraniwikon-wibukontol-appweb3-based-linuxweb3-music-makerwota-wibu-bersatu-appwibu-watcher-appiso-ora-toolkids-and-code-mobilekids-need-codingkids-on-chain-appkentot-lah-appkappa-brand-nftmonstrada-roda-empat-projectstussy-brand-nftsupreme-brand-nftsurvive-from-police-appsong-nft-onchainsong-finder-androidsong-finder-iostutorial-kripto-appterra-angkaratoken-multisendervirtual-dj-androidzksync-nft-builder-app@richxprams/dc-push-rank-new@richxprams/discord-push-rank-api@richxprams/mencarimusic-on-web3-webmusic-onchain-appmode-nft-builder-appmorbid-funknakama-project-appoptimism-nft-builder-apppackage-name-1package-name-3opbnb-nft-builder-apppecahan-tengkorakpanoptikanubispajatkan-doa-doa-appsarang-semut-projectsenayan-track-mapsnike-brand-nftnew-way-to-learn-crypto-appnew-app-from-cronosnft-for-lifenft-builder-cronospenak-jamanku-toh-apppolygon-nft-builder-apppuncalau-projectpukimax-max-propuma-brand-nftpurgatori-martirrabbit-project-oneradio-raheemradio-raheem-remixsinger-streamer-appsinger-web3-karaokegratisan-kripto-apkiiisurreskhunillsurrekshunhidup-indah-projectgrew-up-with-cro-iohangout-designer-nfthangout-discord-gamer-appintro-6-6-6list-lagu-hip-hoplinux-for-cronoslinux-for-web3life-with-cronos-applinux-nft-onchainlens-cronos-applearn-way-to-rich-booklearn-new-way-to-die-mobileklandestinmendang-mending-climendang-mending-appmekitot-mekitut-iomencari-cara-baru-toolmencari-harun-masiku-gamemencari-jati-diri-appmencari-kripto-gratismencari-wibu-bangsadmelihat-jendela-projectmegatukadandroid-cronos-miningaku-mah-nubi-osa-c-a-gadidas-brand-nftafter-milk-appa-way-to-heaven-appa-way-to-projectanime-cronos-nftanime-discord-botanime-for-all-appanime-nft-builder-croanime-builder-cronos-chainback-to-crypto-projectanjailani-scriptassc-brand-nft
1.0.1

1 year ago

1.1.9

1 year ago

1.1.8

1 year ago

1.1.7

1 year ago