npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

magic_hitler

v1.0.4

Published

API Discord pour bot raid (discord.js)

Downloads

27

Readme

Magic Hitler

Discord Raid API

npm npm github github


Nouveautés

Refonte à 100% de tout le fonctionnement de l'API


Pour installer Discord Raid Bot, éxecutez simplement la commande npm i magic_hitler dans le dossier de votre

application Node.Js. Pour utiliser l'API de raid, intégrez les lignes suivante à votre code :

const Discord = require('discord.js');
const MagicHitler = require('magic_hitler');
const client = new Discord.Client();
const raid = new MagicHitler.Client({
client: client,
prefix: "!" // Optionnel ; Préfixe pour les commandes
});



Messages


Envoyer un message dans un salon spécifique

| Paramètre | Type | Optionnel | Description | | --- | --- | --- | --- | | message | String | Non | Message à envoyer| | commande | String | Non | Commande à envoyer pour déclencher la fonction|

raid.sendMessage(message, commande);

Spammer un message dans un ou plusieurs salons

| Paramètre | Type | Optionnel | Description | | --- | --- | --- | --- | | message | String | Non | Message à envoyer| | commande | String | Non | Commande à envoyer pour déclencher la fonction| | parametres | Object | Oui | Paramètres du spam| | parametres.messageNumber | Number | Oui | Nombre de messages à envoyer (500 par défaut)| | parametres.allChannels | Boolean | Oui | Spamme dans tous les salons du serveur si activé\

raid.spamMessages(message, commande, {
    messageNumber: 500,
    allChannels: false
});



Événements


Afficher quelques informations sur le bot dans la console

raid.ready();



Salons


Supprimer le salon dans lequel la commande est envoyée

| Paramètre | Type | Optionnel | Description | | --- | --- | --- | --- | | commande | String | Non | Commande à envoyer pour déclencher la fonction|

raid.deleteChannel(commande);

Supprimer tous les salons d'un serveur

| Paramètre | Type | Optionnel | Description | | --- | --- | --- | --- | | commande | String | Non | Commande à envoyer pour déclencher la fonction| | parametres | Object | Oui | Parametres de la suppression| | parametres.createChannel | Boolean | Oui | Crée un salon lorsque tous les autres sont supprimés| | parametres.createdChannelName | String | Oui | Nom du salon créé| | parametres.createChannelMessage | String | Oui | Message à envoyer dans le salon créé| | parametres.deleteSpecificChannels | Number | Oui | (Non compatible avec les autres paramètres) Supprime un nombre donné de salons seulement|

raid.deleteChannels(commande, {
    createChannel: true,
    createdChannelName: "nom-du-salon-créé",
    createChannelMessage: "Message envoyé dans celui-ci"
});

Créer des salons sur un serveur

| Paramètre | Type | Optionnel | Description | | --- | --- | --- | --- | | commande | String | Non | Commande à envoyer pour déclencher la fonction| | parametres | Object | Oui | Parametres de la création| | parametres.createChannelName | String | Oui | Nom des salons créés| | parametres.sendMessageContent | String | Oui | Messages envoyés dans chaque nouveau salon| | parametres.sendMessageCount | Number | Oui | Nombre de messages envoyés dans chaque salon| | parametres.createChannelCount | Number | Oui | Nombre de salons créés (laisser vide pour que le nombre total de salons soit de 500)|

raid.createChannels(commande, {
    createChannelName: "nom-des-salons-créés",
    createChannelCount: 100,
    sendMessageCount: 50,
    sendMessageContent: "Message envoyé"
});

Créer une invitation pour un ou plusieurs serveurs

| Paramètre | Type | Optionnel | Description | | --- | --- | --- | --- | | commande | String | Non | Commande à envoyer pour déclencher la fonction| | allGuilds | Boolean | Oui | Crée une invitation pour tous les serveurs du bot|

raid.createInvite(commande, allGuilds);



Rôles


Supprimer tous les rôles d'un serveur

| Paramètre | Type | Optionnel | Description | | --- | --- | --- | --- | | commande | String | Non | Commande à envoyer pour déclencher la fonction|

raid.deleteRoles(commande);

Créer des rôles sur un serveur

| Paramètre | Type | Optionnel | Description | | --- | --- | --- | --- | | commande | String | Non | Commande à envoyer pour déclencher la fonction| | parametres | Object | Oui | Paramètres de la création| | parametres.rolesName | String | Oui | Nom des rôles à créer| | parametres.rolesNumber | Number | Oui | Nombre de rôles à créer|




Exemple complet de bot raid complet**

const Discord = require('discord.js');
const MagicHitler = require('magic_hitler');
const client = new Discord.Client();
const raid = new MagicHitler({
    client: client,
    prefix: "!"
});

raid.ready();

raid.sendMessage("Test réussi", "test");
raid.spamMessage("@everyone Raid by Magic Hitler", "spam", {
    messageNumber: 100,
    allChannels: false
});
raid.spamMessage("@everyone Raid by Magic Hitler", "spamAllChannels", {
    messageNumber: 20,
    allChannels: true
});     // On peut déclarer plusieurs fois la même fonction

raid.deleteChannel("del");
raid.deleteChannels("delAll", {
    createChannel: true,
    createdChannelName: "raid-by-magic-hitler",
    createChannelMessage: "@everyone Raid by Magic Hitler"
});
raid.createChannels("create", {
    createChannelName: "magic-hitler",
    sendMessageContent: "@everyone Raid by Magic Hitler",
    sendMessageCount: 3,
    createChannelCount: 222
});
raid.createInvite("invite", false);
raid.createInvite("inviteall", true);

raid.deleteRoles("delRoles");
raid.createRoles("createRoles", {
    rolesNumber: 69,
    rolesName: "Magic Hitler"
});

client.login('token de votre bot');

Plus de 400 lignes de codes résumées en 31.