1.0.3 • Published 4 years ago

discord.xml v1.0.3

Weekly downloads
10
License
-
Repository
github
Last release
4 years ago

Installation

npm: npm i discord.xml

Example Usage

The passed XML code must have a root element. The library parses XML into a JavaScript object and makes an aurora-djs client, so check the examples for that.

const XMLClient = require("discord.xml");

const xml = `
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<root>
  <fetchAllMembers>true</fetchAllMembers>
  <config>
    <token>YOUR_TOKEN_HERE</token>
    <helpCommand>
      <name>help</name>
      <aliases>h</aliases>
      <aliases>commands</aliases>
      <color>#33ff69</color>
      <title>Help</title>
      <notFound>
        <message>Command or category {{name}} not found.</message>
      </notFound>
    </helpCommand>
    <prefixes>{{mention}}</prefixes>
    <prefixes>?</prefixes>
    <caseSensitive>false</caseSensitive>
    <owner>576083686055739394</owner>
    <readyMessage>I'm ready!</readyMessage>
    <ignoreDMs>true</ignoreDMs>
    <ignoreBots>true</ignoreBots>
    <welcomeMessage>
      <content>Welcome to {{servername}}, {{username}}! The server now has {{membercount}} members</content>
      <channel>welcome</channel>
    </welcomeMessage>
    <leaveMessage>
      <content>Why though {{username}} :(</content>
      <channel>goodbye</channel>
    </leaveMessage>
    <logErrors>true</logErrors>
    <errorMessage>There was an error running that command.</errorMessage>
    <noPermissionsMessage>You don't have permission to do that.</noPermissionsMessage>
    <commands>
      <name>ping</name>
      <aliases>pong</aliases>
      <response>Pong!</response>
      <type>all</type>
      <description>Replies "Pong!"</description>
    </commands>
    <commands>
      <name>best-framework</name>
      <response>Discord.XML</response>
      <type>all</type>
      <description>Tells you the best framework: Discord.XML</description>
    </commands>
  </config>
</root>
`;

new XMLClient(xml);
1.0.2

4 years ago

1.0.3

4 years ago

1.1.0

4 years ago

1.0.1

8 years ago

1.0.0

8 years ago