├── .gitignore
├── README.md
├── app
├── .eslintrc.json
├── assets
│ └── bee-movie-script.js
├── commands
│ ├── example
│ │ └── exampleCommand.js
│ ├── info
│ │ ├── afk.js
│ │ ├── avatar.js
│ │ ├── botinfo.js
│ │ ├── channelinfo.js
│ │ ├── emojiinfo.js
│ │ ├── help.js
│ │ ├── ping.js
│ │ ├── roleinfo.js
│ │ ├── serverinfo.js
│ │ ├── shardinfo.js
│ │ ├── speedtest.js
│ │ ├── uptime.js
│ │ └── userinfo.js
│ ├── media
│ │ └── belike.js
│ ├── misc
│ │ ├── embed.js
│ │ └── json.js
│ ├── moderation
│ │ ├── ban.js
│ │ ├── channeltopic.js
│ │ ├── emote.js
│ │ ├── kick.js
│ │ └── purge.js
│ ├── owner
│ │ ├── eval.js
│ │ ├── exec.js
│ │ ├── leaveServer.js
│ │ ├── setActivity.js
│ │ ├── setAvatar.js
│ │ ├── setNickname.js
│ │ ├── setUsername.js
│ │ └── ssh.js
│ ├── search
│ │ ├── dictionary.js
│ │ ├── google.js
│ │ ├── lmgtfy.js
│ │ └── urban.js
│ └── test
│ │ ├── prefix.js
│ │ └── quote.js
├── config.json.EXAMPLE
├── index.js
├── models
│ ├── commandsModel.js
│ └── guildModel.js
├── package.json
├── paladin.js
├── sequelize.js
└── util
│ ├── emote.js
│ ├── paladinUtils.js
│ └── statics.js
├── docs
├── .gitignore
├── docs
│ ├── .vuepress
│ │ ├── components
│ │ │ ├── Admonition.vue
│ │ │ ├── DiscordInvite.vue
│ │ │ ├── DiscordJoin.vue
│ │ │ ├── DiscordWidget.vue
│ │ │ ├── Expansion.vue
│ │ │ ├── GitHub.vue
│ │ │ ├── Hint.vue
│ │ │ ├── IconTextCard.vue
│ │ │ ├── ImageCard.vue
│ │ │ ├── PaladinStats.vue
│ │ │ ├── example
│ │ │ │ ├── IconTextCardExample.vue
│ │ │ │ └── ImageCardExample.vue
│ │ │ └── index.js
│ │ ├── config.js
│ │ ├── noopModule.js
│ │ ├── sidebar.js
│ │ └── theme
│ │ │ ├── LICENSE
│ │ │ ├── components
│ │ │ ├── API.vue
│ │ │ ├── AlgoliaSearchBox.vue
│ │ │ ├── DropdownLink.vue
│ │ │ ├── DropdownTransition.vue
│ │ │ ├── Footer.vue
│ │ │ ├── Home.vue
│ │ │ ├── NavLink.vue
│ │ │ ├── NavLinks.vue
│ │ │ ├── Navbar.vue
│ │ │ ├── Page.vue
│ │ │ ├── Sidebar.vue
│ │ │ ├── SidebarButton.vue
│ │ │ ├── SidebarGroup.vue
│ │ │ ├── SidebarLink.vue
│ │ │ └── SidebarLinks.vue
│ │ │ ├── enhanceApp.js
│ │ │ ├── global-components
│ │ │ └── Badge.vue
│ │ │ ├── index.js
│ │ │ ├── layouts
│ │ │ ├── 404.vue
│ │ │ └── Layout.vue
│ │ │ ├── noopModule.js
│ │ │ ├── styles
│ │ │ ├── arrow.styl
│ │ │ ├── code.styl
│ │ │ ├── custom-blocks.styl
│ │ │ ├── hero.styl
│ │ │ ├── index.styl
│ │ │ ├── mobile.styl
│ │ │ ├── palette.styl
│ │ │ ├── sidebar.styl
│ │ │ ├── toc.styl
│ │ │ └── wrapper.styl
│ │ │ └── util
│ │ │ └── index.js
│ ├── README.md
│ ├── images
│ │ ├── branding
│ │ │ ├── banner-alt-transparent.png
│ │ │ ├── banner-large.png
│ │ │ ├── banner-small.png
│ │ │ ├── banner-transparent.png
│ │ │ ├── banner.png
│ │ │ ├── book-large.png
│ │ │ ├── book-small.png
│ │ │ ├── book.png
│ │ │ ├── logo-alt-transparent.png
│ │ │ ├── logo-large.png
│ │ │ ├── logo-simple.png
│ │ │ ├── logo-small.png
│ │ │ ├── logo-transparent.png
│ │ │ └── logo.png
│ │ ├── logo.png
│ │ └── paypal.png
│ ├── information
│ │ ├── README.md
│ │ ├── afk.md
│ │ ├── avatar.md
│ │ ├── botinfo.md
│ │ ├── channelinfo.md
│ │ ├── emojiinfo.md
│ │ ├── help.md
│ │ ├── ping.md
│ │ ├── roleinfo.md
│ │ ├── serverinfo.md
│ │ ├── shardinfo.md
│ │ ├── speedtest.md
│ │ ├── uptime.md
│ │ └── userinfo.md
│ ├── media
│ │ ├── README.md
│ │ └── belike.md
│ ├── misc
│ │ ├── README.md
│ │ ├── embed.md
│ │ └── json.md
│ ├── moderation
│ │ ├── README.md
│ │ ├── ban.md
│ │ ├── channeltopic.md
│ │ ├── emote.md
│ │ ├── kick.md
│ │ └── purge.md
│ ├── owner
│ │ ├── README.md
│ │ ├── eval.md
│ │ ├── exec.md
│ │ ├── leaveServer.md
│ │ ├── setActivity.md
│ │ ├── setAvatar.md
│ │ ├── setNickname.md
│ │ ├── setUsername.md
│ │ └── ssh.md
│ ├── search
│ │ ├── README.md
│ │ ├── dictionary.md
│ │ ├── google.md
│ │ ├── lmgtfy.md
│ │ └── urban.md
│ ├── usage
│ │ ├── README.md
│ │ ├── cards.md
│ │ ├── container.md
│ │ ├── discordjs
│ │ │ └── README.md
│ │ ├── latex.md
│ │ ├── markdown.md
│ │ ├── monitoring.md
│ │ └── vuepress.md
│ ├── util
│ │ ├── README.md
│ │ ├── discordjs.md
│ │ ├── latex.md
│ │ ├── markdown.md
│ │ ├── markdown
│ │ │ └── container.md
│ │ ├── monitoring.md
│ │ └── vuepress.md
│ └── welcome.md
├── enhanceApp.js
└── package.json
├── restart.sh
├── start.sh
├── stop.sh
└── update.sh
/.gitignore:
--------------------------------------------------------------------------------
1 | # app #
2 | /app/node_modules
3 | /app/test
4 | /app/package-lock.json
5 | /app/config.json
6 |
7 | # IntelliJ #
8 | .idea
9 |
10 | # Testing folder #
11 | test/*
12 |
13 | # Visual Studio Code #
14 | .settings/*
15 | .project
16 |
17 | # modules #
18 | node_modules
19 | package-lock.json
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | PaladinJS is an open-source Multipurpose Premium Discord Bot Project with unique features.
8 | ==============
9 |
10 | >### Status: alpha
11 | >At the moment it is not recommended to host this bot since you will run into serveral problems.
12 |
13 |
14 | >### Releases: none
15 | >Wait for it ...
16 |
17 | This page only gives very basic information, for the detailed information about building and developing PaladinJS, please visit the developers Discord server.
18 |
19 | - [Web Site](https://www.paladinbot.online )
20 |
21 | - [Documentation](https://www.paladinbot.online/docs)
22 |
23 | - [Forum](https://www.paladinbot.online/forum)
24 |
25 | - [Join Paladin to your server](https://discordapp.com/oauth2/authorize?client_id=455157940140113921&scope=bot&permissions=2146958839)
26 |
27 | - [Live Support Server](https://discord.gg/RFSYyCU)
28 |
29 |
30 | ## Contributing
31 | 1) Fork it
32 | 2) Create your feature branch: git checkout -b my-new-feature
33 | 3) Commit your changes: git commit -m 'Add some feature'
34 | 4) Push to the branch: git push origin my-new-feature
35 | 5) Submit a pull request
36 |
37 |
38 | ## Donations
39 | Paladin is totally free and everyone can use it without restrictions.
40 | Since I have to pay the host for it and also invest a lot of time in the development I would appreciate every single donation.
41 | You can donate form [here](https://donatebot.io/checkout/393207704211947521) using PayPal.
42 |
43 |
44 |
45 |
46 |
47 | ## Paladin uses
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 | ## We use Netdata to monitor our application
65 |
66 |
67 |
--------------------------------------------------------------------------------
/app/.eslintrc.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "eslint:recommended",
3 | "env": {
4 | "node": true,
5 | "es6": true
6 | },
7 | "parserOptions": {
8 | "ecmaVersion": 2017
9 | },
10 | "rules": {
11 | "brace-style": ["error", "stroustrup", { "allowSingleLine": true }],
12 | "comma-dangle": ["error", "always-multiline"],
13 | "comma-spacing": "error",
14 | "comma-style": "error",
15 | "curly": ["error", "multi-line", "consistent"],
16 | "dot-location": ["error", "property"],
17 | "handle-callback-err": "off",
18 | "indent": ["error", "tab"],
19 | "max-nested-callbacks": ["error", { "max": 4 }],
20 | "max-statements-per-line": ["error", { "max": 2 }],
21 | "no-console": "off",
22 | "no-empty-function": "error",
23 | "no-floating-decimal": "error",
24 | "no-inline-comments": "error",
25 | "no-lonely-if": "error",
26 | "no-multi-spaces": "error",
27 | "no-multiple-empty-lines": ["error", { "max": 2, "maxEOF": 1, "maxBOF": 0 }],
28 | "no-shadow": ["error", { "allow": ["err", "resolve", "reject"] }],
29 | "no-trailing-spaces": ["error"],
30 | "no-var": "error",
31 | "object-curly-spacing": ["error", "always"],
32 | "prefer-const": "error",
33 | "quotes": ["error", "single"],
34 | "semi": ["error", "always"],
35 | "space-before-blocks": "error",
36 | "space-before-function-paren": ["error", {
37 | "anonymous": "never",
38 | "named": "never",
39 | "asyncArrow": "always"
40 | }],
41 | "space-in-parens": "error",
42 | "space-infix-ops": "error",
43 | "space-unary-ops": "error",
44 | "spaced-comment": "error",
45 | "yoda": "error"
46 | }
47 | }
48 |
--------------------------------------------------------------------------------
/app/commands/example/exampleCommand.js:
--------------------------------------------------------------------------------
1 | const Discord = require('discord.js');
2 | const { gPrefix } = require('../../config.json');
3 | const emote = require('../../util/emote.js');
4 | const { images } = require('../../util/statics.js');
5 |
6 | module.exports = {
7 | name: '',
8 | description: '',
9 | category: '',
10 | documentationURL: '',
11 | usage: [],
12 | args: true,
13 | guildOnly: false,
14 | aliases: [],
15 | userPermissions: [],
16 | botPermissions: [],
17 | examples: [],
18 | params:[],
19 | cooldown: 5,
20 | arguments: [
21 | { name: 'msg', type: String, multiple: true, alias: 'm', defaultOption: true },
22 | { name: 'amount', type: Number, alias: 'n', defaultValue: 100},
23 | { name: 'bots', type: Boolean, alias: 'b' },
24 | { name: 'pinned', type: Boolean, alias: 'p' },
25 | { name: 'time', type: Number, alias: 't' },
26 | { name: 'delete', type: Boolean, alias: 'd' },
27 | ],
28 | execute(message, args) {
29 | const embed = new Discord.MessageEmbed().setColor('#FF00FF');
30 |
31 | // .....
32 | },
33 | };
--------------------------------------------------------------------------------
/app/commands/info/afk.js:
--------------------------------------------------------------------------------
1 | const { MessageEmbed } = require('discord.js');
2 | const { gPrefix } = require('../../config.json');
3 | const emote = require('../../util/emote.js');
4 | const paladin = require('../../paladin.js');
5 |
6 | // get your google_search_engine_id from here -> https://cse.google.com
7 | module.exports = {
8 | name: 'AFK',
9 | description: 'Set your afk message',
10 | category: 'info',
11 | documentationURL: 'https://paladin.netlify.com/information/afk.html',
12 | usage: [`\`${gPrefix}afk [afk message]\``],
13 | examples: [`\`${gPrefix}afk sleeping ... leave me a DM\``],
14 | params: ['`[afk message]` - The message to display if someone mentions you.'],
15 | cooldown: 10,
16 | arguments: [
17 | { name: 'msg', type: String, multiple: true, alias: 'm', defaultOption: true },
18 | { name: 'delete', type: Boolean, alias: 'd' },
19 | ],
20 | execute(message, args) {
21 | const embed = new MessageEmbed().setColor('#FF00FF');
22 | const afkMessage = args.msg ? args.msg.join(' ') : 'I am afk.';
23 | afkUsers.set(message.author.id, {
24 | afkMessage: afkMessage,
25 | displayAvatarUrl: message.author.displayAvatarURL(),
26 | timestamp: message.createdTimestamp,
27 | });
28 | try {
29 | message.react(emote.check.id);
30 | } catch (e) {
31 | embed.setTitle(`Your afk message is`).setDescription(`${afkMessage}`);
32 | message.channel.send(embed);
33 | }
34 | },
35 | handleAfkMessage(message) {
36 | const afkStatus = afkUsers.get(message.author.id);
37 | if (afkStatus) {
38 | const embed = new MessageEmbed().setColor('#FF00FF');
39 | embed.setTitle('Welcome back ' + message.author.username)
40 | .setDescription('Your afk status has been removed');
41 | afkUsers.delete(message.author.id);
42 | return message.channel.send(embed);
43 | }
44 | const mentionedAfkUsers = message.mentions.users.filter(u => afkUsers.get(u.id));
45 | if (mentionedAfkUsers.size > 0) {
46 | const embed = new MessageEmbed().setColor('#FF00FF');
47 | const onlyOneMention = mentionedAfkUsers.size === 1;
48 | mentionedAfkUsers.forEach(u => {
49 | const user_afk = afkUsers.get(u.id);
50 | if (onlyOneMention) {
51 | embed.setAuthor(`${u.username} is afk`, user_afk.displayAvatarUrl, user_afk.displayAvatarUrl)
52 | .setDescription(`${user_afk.afkMessage}\n${getTime(new Date().getTime(), user_afk.timestamp)}`);
53 | }
54 | else
55 | embed.addField(`${u.username} is afk`, `${user_afk.afkMessage}\nafk since: ${getTime(new Date().getTime(), user_afk.timestamp)}`);
56 | });
57 | message.channel.send(embed);
58 | }
59 | },
60 | };
61 |
62 | function getTime(timestamp_1, timestamp_2) {
63 |
64 | let difference = timestamp_1 - timestamp_2;
65 |
66 | const daysDifference = Math.floor(difference / 1000 / 60 / 60 / 24);
67 |
68 | difference -= daysDifference * 1000 * 60 * 60 * 24;
69 |
70 | const hoursDifference = Math.floor(difference / 1000 / 60 / 60);
71 | difference -= hoursDifference * 1000 * 60 * 60;
72 |
73 | const minutesDifference = Math.floor(difference / 1000 / 60);
74 | difference -= minutesDifference * 1000 * 60;
75 |
76 | const secondsDifference = Math.floor(difference / 1000);
77 |
78 | return `${daysDifference === 0 ? '' : daysDifference + ' days '}` +
79 | `${hoursDifference === 0 ? '' : '**' + hoursDifference + '** hours '}` +
80 | `${minutesDifference === 0 ? '' : '**' + minutesDifference + '** minutes '}` +
81 | `${secondsDifference === 0 ? '' : '**' + secondsDifference + '** seconds'}`;
82 | }
83 |
84 |
--------------------------------------------------------------------------------
/app/commands/info/avatar.js:
--------------------------------------------------------------------------------
1 | const {MessageEmbed} = require('discord.js');
2 | const { gPrefix } = require('../../config.json');
3 | const { getUser } = require('../../util/paladinUtils.js');
4 |
5 | module.exports = {
6 | name: 'Avatar',
7 | description: 'Get the avatar URL of the tagged user(s), or your own avatar.',
8 | category: 'info',
9 | guildOnly: false,
10 | documentationURL: 'https://paladin.netlify.com/information/avatar.html',
11 | usage: [`${gPrefix}avatar`, `${gPrefix}avatar [@user]`, `${gPrefix}avatar [user-name]`, `${gPrefix}avatar [user-id]`],
12 | aliases: ['icon', 'pfp'],
13 | params: ['`[@user]` - user as mention', '`[@user1 @user2 ... @user5]` - get up to 5 avatars.',
14 | '`[user-id]` - id of the user',
15 | '`[user-name]` - the username',
16 | ],
17 | arguments: [
18 | { name: 'msg', type: String, multiple: true, alias: 'm', defaultOption: true },
19 | { name: 'delete', type: Boolean, alias: 'd' },
20 | ],
21 | cooldown: 5,
22 | execute(message, args) {
23 | if (message.mentions.users.size > 1) {
24 | const mentionedUsers = message.mentions.users.array().slice(0, 5);
25 | mentionedUsers.map(user => {
26 | const exampleEmbed = new Discord.RichEmbed().setColor('#FF00FF');
27 | exampleEmbed.setImage(user.displayAvatarURL());
28 | exampleEmbed.setAuthor(user.username, user.displayAvatarURL(), user.displayAvatarURL());
29 | return message.channel.send(exampleEmbed);
30 | });
31 | return;
32 | }
33 |
34 | const target = getUser(message, args.msg);
35 |
36 | if (!target)
37 | return message.channel.send('No user found!');
38 |
39 | const exampleEmbed = new MessageEmbed().setColor('#FF00FF');
40 | exampleEmbed.setImage(target.displayAvatarURL());
41 | exampleEmbed.setAuthor(target.username, target.displayAvatarURL(), target.displayAvatarURL());
42 | return message.channel.send(exampleEmbed);
43 | },
44 | };
--------------------------------------------------------------------------------
/app/commands/info/botinfo.js:
--------------------------------------------------------------------------------
1 | const Discord = require('discord.js');
2 | const { gPrefix } = require('../../config.json');
3 | const statics = require('../../util/statics.js');
4 | const util = require('../../util/paladinUtils.js');
5 | const emote = require('../../util/emote.js');
6 | const {getUptime} = require('./uptime.js');
7 |
8 | // get your google_search_engine_id from here -> https://cse.google.com
9 | module.exports = {
10 | name: 'BotInfo',
11 | description: 'Get an overview about Paladin Stats',
12 | category: 'info',
13 | documentationURL: 'https://paladin.netlify.com/information/botinfo.html',
14 | args: false,
15 | guildOnly: false,
16 | aliases: ['paladin', 'stats', 'binfo', 'info'],
17 | usage: [`\`${gPrefix}botinfo\``],
18 | cooldown: 60,
19 | arguments: [
20 | { name: 'delete', type: Boolean, alias: 'd' },
21 | ],
22 | async execute(message, args) {
23 |
24 | const guildCounts = await message.client.shard.fetchClientValues('guilds.size');
25 | const memberCounts = await message.client.shard.broadcastEval('this.guilds.reduce((prev, guild) => prev + guild.memberCount, 0)');
26 | const channelCounts = await message.client.shard.broadcastEval('this.guilds.reduce((prev, channel) => prev + channel.channels.size, 0)');
27 |
28 | const totalGuilds = guildCounts.reduce((prev, val) => prev + val, 0);
29 | const totalMembers = memberCounts.reduce((prev, memberCount) => prev + memberCount, 0);
30 | const totalChannels = channelCounts.reduce((prev, channelCount) => prev + channelCount, 0);
31 |
32 |
33 |
34 | const embed = new Discord.MessageEmbed().setColor('#FF00FF')
35 | .setAuthor(message.author.username, message.author.displayAvatarURL(), message.author.displayAvatarURL())
36 | .setThumbnail(statics.images.PaladinAvatar)
37 | .setDescription('**__Bot Stats__**')
38 | .addField('Name', message.client.user.toString(), true)
39 | .addField('Owner', 'KENTARO#2898', true)
40 | .addField('Shards', message.client.shard.count, true)
41 | .addField('Servers', totalGuilds, true)
42 | .addField('Channels', totalChannels, true)
43 | .addField('Members', totalMembers, true)
44 | .addField('Commands', message.client.commands.size, true)
45 | .addField('Ping', message.client.ws.ping.toFixed(0) + ' ms', true)
46 | .addField('Prefix', message.client.prefixes.get(message.guild.id))
47 | .addField('Since last restart', `${messagesRecieved} messages recieved\n${commandsExecuted} commands executed`, true)
48 | .addField('Joined Discord', util.formatDate(message.client.user.createdAt), true)
49 | .addField('Memory Usage', `${(process.memoryUsage().rss / 1024 / 1024).toFixed(0)} MB RSS\n`
50 | + `${(process.memoryUsage().heapUsed / 1024 / 1024).toFixed(0)} MB Heap`, true)
51 | .addField('Uptime', getUptime(message), false)
52 | .addField('Platforms - Libraries', `${emote.node} Node.js 10.13.0\n\n${emote.discord_js} Discord.js github:discord.js\n\n`
53 | + `${emote.ubuntu} Ubuntu 16.04.5 LTS\n\n` +
54 | `${emote.webstorm} Webstorm 2018.2.2\n\n${emote.paladin} Paladin 1.0.4`);
55 |
56 | message.channel.send(embed);
57 | },
58 | };
--------------------------------------------------------------------------------
/app/commands/info/channelinfo.js:
--------------------------------------------------------------------------------
1 | const { MessageEmbed } = require('discord.js');
2 | const { Permissions } = require('discord.js');
3 | const { gPrefix } = require('../../config.json');
4 | const emote = require('../../util/emote.js');
5 | const { booldReaction, getChannel, formatDate } = require('../../util/paladinUtils.js');
6 | const { images } = require('../../util/statics.js');
7 |
8 | // get your google_search_engine_id from here -> https://cse.google.com
9 | module.exports = {
10 | name: 'ChannelInfo',
11 | description: 'Get an overview about a channel',
12 | category: 'info',
13 | documentationURL: 'https://paladin.netlify.com/information/channelinfo.html',
14 | usage: [`\`${gPrefix}channelinfo [#channel]\``, `\`${gPrefix}channelinfo [channel id]\``, `\`${gPrefix}channelinfo [channel-name]\``],
15 | guildOnly: true,
16 | aliases: ['cinfo'],
17 | examples: [`\`${gPrefix}channelinfo #general\``],
18 | params: ['\`[#channel]\` - The channel as mention', '\`[channel-id]\` - id of channel', '\`[channel-name]\` - name of channel'],
19 | cooldown: 5,
20 | arguments: [
21 | { name: 'msg', type: String, multiple: true, alias: 'm', defaultOption: true },
22 | { name: 'delete', type: Boolean, alias: 'd' },
23 | ],
24 | execute(message, args) {
25 |
26 | const embed = new MessageEmbed().setColor('#FF00FF');
27 | const target = getChannel(message, args.msg);
28 |
29 | if (!target)
30 | return message.channel.send('No channel found!');
31 |
32 | embed.setAuthor(message.author.username, message.author.displayAvatarURL(), message.author.displayAvatarURL())
33 | .addField('ID', target.id, true)
34 | .addField('Name', target.toString(), true)
35 | .setThumbnail(images.PaladinAvatar)
36 | .setDescription('**__Channel Overview:__** ')
37 | .addField('NSFW', booldReaction(message, target.nsfw), true)
38 | .addField('Created at', formatDate(target.createdAt), true)
39 | .addField('Type', target.type.toUpperCase(), true)
40 | .addField('Members', target.members.size, true)
41 | .addField('Topic', target.topic ? target.topic.toString() : emote.disabled.mention);
42 |
43 | message.channel.send(embed);
44 | },
45 | };
--------------------------------------------------------------------------------
/app/commands/info/emojiinfo.js:
--------------------------------------------------------------------------------
1 | const { MessageEmbed, Util } = require('discord.js');
2 | const { gPrefix } = require('../../config.json');
3 | const {formatDate} = require('../../util/paladinUtils.js')
4 |
5 | module.exports = {
6 | name: 'EmojiInfo',
7 | description: 'Get an overview about a specific emoji',
8 | category: 'info',
9 | documentationURL: 'https://paladin.netlify.com/information/emojiinfo.html',
10 | usage: [`\`${gPrefix}emojiinfo [emoji name]\``, `\`${gPrefix}emojiinfo [emoji id]\``, `\`${gPrefix}emojiinfo [:emoji:]\``],
11 | guildOnly: true,
12 | args: true,
13 | aliases: ['einfo'],
14 | params: ['\`[:emoji:]\` - The name emoji as mention', '\`[emoji name]\` - The name of the emoji', '\`[emoji id]\` - The id of the emoji'],
15 | cooldown: 5,
16 | arguments: [
17 | { name: 'msg', type: String, multiple: true, alias: 'm', defaultOption: true },
18 | { name: 'delete', type: Boolean, alias: 'd' },
19 | ],
20 | execute(message, args) {
21 | const embed = new MessageEmbed().setColor('#FF00FF');
22 | let emoji = message.guild.emojis.find(emoji => emoji.name === args.msg.join(' '));
23 |
24 | if (!emoji) {
25 | emoji = Util.parseEmoji(args.msg.join(' '));
26 | emoji = message.guild.emojis.find(e => e.id === emoji.id);
27 | }
28 |
29 | if (!emoji)
30 | emoji = message.guild.emojis.find(e => e.id === args.msg[0]);
31 |
32 | if (!emoji)
33 | return message.channel.send(embed.setDescription('Emoji not found'));
34 |
35 | embed.setAuthor(message.author.username, message.author.displayAvatarURL(), message.author.displayAvatarURL())
36 | .addField('ID', emoji.id, true)
37 | .addField('Name', emoji.name, true)
38 | .setThumbnail(emoji.url)
39 | .setDescription('**__Emoji Overview:__** ')
40 | .addField('Created at', formatDate(emoji.createdAt), true);
41 |
42 | message.channel.send(embed);
43 | },
44 | };
--------------------------------------------------------------------------------
/app/commands/info/ping.js:
--------------------------------------------------------------------------------
1 | const { gPrefix } = require('../../config.json');
2 | const Discord = require('discord.js');
3 | const emote = require('../../util/emote.js');
4 | const { images } = require('../../util/statics.js');
5 |
6 | module.exports = {
7 | name: 'Ping',
8 | description: 'Get Discord websocket and rest pings',
9 | category: 'info',
10 | guildOnly: false,
11 | documentationURL: 'https://paladin.netlify.com/information/ping.html',
12 | usage: [`${gPrefix}ping`],
13 | botPermissions: ['ADD_REACTIONS'],
14 | cooldown: 60,
15 | arguments: [
16 | { name: 'delete', type: Boolean, alias: 'd' },
17 | ],
18 | async execute(message, args) {
19 | const start = new Date().getTime();
20 | let duration = 0;
21 | await message.react(emote.check.id);
22 | duration = new Date().getTime() - start;
23 | const embed = new Discord.MessageEmbed().setColor('#FF00FF')
24 | .setAuthor(message.author.username, message.author.displayAvatarURL(), message.author.displayAvatarURL())
25 | .setThumbnail(images.shield)
26 | .addField('Gateway (Rest) Ping', duration + ' ms', true)
27 | .addField('Discord Websocket', message.client.ws.ping.toFixed(0), true);
28 | message.channel.send(embed);
29 | },
30 | };
--------------------------------------------------------------------------------
/app/commands/info/roleinfo.js:
--------------------------------------------------------------------------------
1 | const {MessageEmbed} = require('discord.js');
2 | const { Permissions } = require('discord.js');
3 | const { gPrefix } = require('../../config.json');
4 | const emote = require('../../util/emote.js');
5 | const { booldReaction, getRole } = require('../../util/paladinUtils.js');
6 | const { images } = require('../../util/statics.js');
7 |
8 | // get your google_search_engine_id from here -> https://cse.google.com
9 | module.exports = {
10 | name: 'RoleInfo',
11 | description: 'Get an overview about a role',
12 | category: 'info',
13 | documentationURL: 'https://paladin.netlify.com/information/roleinfo.html',
14 | usage: [`\`${gPrefix}roleinfo [@role]\``, `\`${gPrefix}roleinfo [role id]\``, `\`${gPrefix}roleinfo [role-name]\``],
15 | args: true,
16 | guildOnly: true,
17 | aliases: ['rinfo'],
18 | examples: [`\`${gPrefix}roleinfo @Admin\``],
19 | params: ['\`[@role]\` - The role as mention', '\`[role-id]\` - id of role', '\`[role-name]\` - name of role'],
20 | cooldown: 5,
21 | arguments: [
22 | { name: 'msg', type: String, multiple: true, alias: 'm', defaultOption: true },
23 | { name: 'delete', type: Boolean, alias: 'd' },
24 | ],
25 | execute(message, args) {
26 |
27 | const embed = new MessageEmbed().setColor('#FF00FF');
28 | const target = getRole(message, args.msg);
29 |
30 | if (!target)
31 | return message.channel.send('No role found!');
32 |
33 | const permissions = new Permissions(target.permissions);
34 |
35 | embed.setAuthor(message.author.username, message.author.displayAvatarURL(), message.author.displayAvatarURL())
36 | .addField('ID', target.id, true)
37 | .setThumbnail(images.PaladinAvatar)
38 | .setDescription('**__Role Overview:__** ' + target.toString())
39 | .addField('Mentionable', booldReaction(message, target.mentionable), true)
40 | .addField('Managed', booldReaction(message, target.managed), true)
41 | .addField('Hoisted', booldReaction(message, target.hoist), true)
42 | .addField('Position', target.position, true)
43 | .addField('Members', target.members.size, true)
44 | .addField('Hax Color', target.hexColor, true)
45 | .addField('Permissions', '```prolog\n' + permissions.toArray().map(p => p).join('\n') + '```');
46 | message.channel.send(embed);
47 | },
48 | };
--------------------------------------------------------------------------------
/app/commands/info/shardinfo.js:
--------------------------------------------------------------------------------
1 | const { gPrefix } = require('../../config.json');
2 | const Discord = require('discord.js');
3 | const emote = require('../../util/emote.js');
4 |
5 | module.exports = {
6 | name: 'ShardInfo',
7 | description: 'Get an overview about the shards',
8 | category: 'info',
9 | guildOnly: false,
10 | documentationURL: 'https://paladin.netlify.com/information/shardinfo.html',
11 | usage: [`${gPrefix}shardinfo`],
12 | aliases: ['shards', 'shard'],
13 | cooldown: 60,
14 | arguments: [
15 | { name: 'delete', type: Boolean, alias: 'd' },
16 | ],
17 | async execute(message, args) {
18 | const embed = new Discord.MessageEmbed().setColor('#FF00FF')
19 | .setAuthor(message.author.username, message.author.displayAvatarURL(), message.author.displayAvatarURL());
20 | const shardArray = await message.client.shard.fetchClientValues('shard.client.guilds');
21 | const shardStatus = await message.client.shard.fetchClientValues('shard.mode');
22 | const shardPings = await message.client.shard.fetchClientValues('shard.client.ws.ping');
23 | let totalMembers = 0;
24 | let totalGuilds = 0;
25 | let totalChannels = 0;
26 | let pings = [];
27 | for (let i = 0; i < shardArray.length; i++) {
28 | let members = 0;
29 | let guilds = 0;
30 | let channels = 0;
31 | let ping = 0;
32 | for (let j = 0; j < shardArray[i].length; j++) {
33 | members += shardArray[i][j].memberCount;
34 | totalMembers += shardArray[i][j].memberCount;
35 | channels += shardArray[i][j].channels.length;
36 | totalChannels += shardArray[i][j].channels.length;
37 | guilds++;
38 | totalGuilds++;
39 | }
40 | ping = shardPings[i];
41 | pings.push(ping.toFixed(0));
42 | const status = shardStatus[i] === 'process' ? emote.online : emote.offline;
43 | embed.addField(`${status}\nShard ${i}`, `${members} Users\n${guilds} Servers\n${channels} Channels\n${ping.toFixed(0)} ms`, true);
44 | }
45 | const avgShardPing = (pings.reduce((a, ping) => a + ping, 0) / pings.length).toFixed(0);
46 | embed.addField('Total', `${totalGuilds} Servers\n${totalMembers} Users\n${totalChannels} Channels`)
47 | .setFooter(`Avg Ping: ${avgShardPing} ms`);
48 | message.channel.send(embed);
49 | },
50 | };
--------------------------------------------------------------------------------
/app/commands/info/speedtest.js:
--------------------------------------------------------------------------------
1 | const { gPrefix } = require('../../config.json');
2 | const Discord = require('discord.js');
3 | const emote = require('../../util/emote.js');
4 | const { images } = require('../../util/statics.js');
5 | var speedTest = require('speedtest-net');
6 | module.exports = {
7 | name: 'Speedtest',
8 | description: '',
9 | category: 'info',
10 | guildOnly: false,
11 | documentationURL: 'https://paladin.netlify.com/information/speedtest.html',
12 | usage: [`${gPrefix}speedtest`],
13 | cooldown: 60,
14 | aliases: ['stest'],
15 | arguments: [
16 | { name: 'delete', type: Boolean, alias: 'd' },
17 | ],
18 | async execute(message, args) {
19 | const start = new Date().getTime();
20 | let duration = 0;
21 | await message.react(emote.check.id);
22 | duration = new Date().getTime() - start;
23 | const embed = new Discord.MessageEmbed().setColor('#FF00FF')
24 | .setDescription('Speedtest running ...' + emote.loading.mention);
25 | const msg = await message.channel.send(embed);
26 |
27 | const test = speedTest({ maxTime: 5000 });
28 |
29 | test.on('data', data => {
30 | const download = data['speeds']['download'].toFixed(0) + ' MBit/s';
31 | const upload = data['speeds']['upload'].toFixed(0) + ' MBit/s';
32 | const host = `${data['server']['host']}`;
33 | const serverPing = `${ data['server']['ping']} ms`;
34 | const embed = new Discord.MessageEmbed().setColor('#FF00FF')
35 | .setDescription('***___Speedtest results___***')
36 | .setThumbnail(images.shield)
37 | .addField('Download',download , true)
38 | .addField('Upload', upload, true)
39 | .addField('Host', host, true)
40 | .addField('Server Ping', serverPing, true);
41 | msg.edit(embed).catch(e => e);
42 | });
43 |
44 | test.on('error', err => {
45 | message.channel.send('Whoops ... something went wrong :neutral_face:')
46 | });
47 | },
48 | };
--------------------------------------------------------------------------------
/app/commands/info/uptime.js:
--------------------------------------------------------------------------------
1 | const { gPrefix } = require('../../config.json');
2 | const Discord = require('discord.js');
3 |
4 | module.exports = {
5 | name: 'Uptime',
6 | description: '',
7 | category: 'info',
8 | guildOnly: false,
9 | documentationURL: 'https://paladin.netlify.com/information/uptime.html',
10 | usage: [`${gPrefix}uptime`],
11 | cooldown: 60,
12 | aliases: ['utime'],
13 | arguments: [
14 | { name: 'delete', type: Boolean, alias: 'd' },
15 | ],
16 | execute(message, args) {
17 | const embed = new Discord.MessageEmbed().setColor('#FF00FF')
18 | embed.setDescription('I\'ve been online for\n' + this.getUptime(message))
19 | message.channel.send(embed);
20 | },
21 | getUptime(message){
22 | let totalSeconds = (message.client.uptime / 1000).toFixed(0);
23 | let days = Math.floor(totalSeconds / 86400).toFixed(0);
24 | let hours = Math.floor(totalSeconds / 3600).toFixed(0);
25 | totalSeconds %= 3600;
26 | let minutes = Math.floor(totalSeconds / 60).toFixed(0);
27 | let seconds = (totalSeconds % 60).toFixed(0);
28 |
29 | return `${days == 0 ? '' : days + ' days, '} ${hours == 0 ? '' : hours + ' hours,'}`
30 | + `${minutes == 0 ? '' : minutes + ' minutes and '} ${seconds} seconds`
31 | }
32 | };
--------------------------------------------------------------------------------
/app/commands/info/userinfo.js:
--------------------------------------------------------------------------------
1 | const Discord = require('discord.js');
2 | const { gPrefix } = require('../../config.json');
3 | const emote = require('../../util/emote.js');
4 | const { getMember, formatDate } = require('../../util/paladinUtils.js');
5 |
6 | // get your google_search_engine_id from here -> https://cse.google.com
7 | module.exports = {
8 | name: 'UserInfo',
9 | description: 'Get an overview about a user',
10 | category: 'info',
11 | documentationURL: 'https://paladin.netlify.com/information/userinfo.html',
12 | usage: [`\`${gPrefix}userinfo [@user]\``, `\`${gPrefix}userinfo [user id]\``, `\`${gPrefix}userinfo [user-name]\``],
13 | args: false,
14 | guildOnly: true,
15 | aliases: ['uinfo', 'whois'],
16 | examples: [`\`${gPrefix}userinfo @YINGYANG#7777\``],
17 | params: ['\`[@user]\` - The user as mention', '\`[user-id]\` - id of user', '\`[user-name]\` - name of user'],
18 | cooldown: 5,
19 | arguments: [
20 | { name: 'msg', type: String, multiple: true, alias: 'm', defaultOption: true },
21 | { name: 'delete', type: Boolean, alias: 'd' },
22 | ],
23 | execute(message, args) {
24 |
25 | const embed = new Discord.MessageEmbed().setColor('#FF00FF');
26 | const target = getMember(message, args.msg);
27 | if (!target)
28 | return message.channel.send('No user found!');
29 |
30 | const owner = target.id === message.guild.owner.id ? emote.check.mention :
31 | emote.disabled.mention;
32 |
33 | const inVoice = target.voiceChannel ? target.voiceChannel.name : emote.disabled.mention;
34 | const isBot = target.user.bot ? emote.botTag : emote.member;
35 | // const game = !target.presence.game ? emote.getPaladinEmote(message, 'disabled') : target.presence.game.name;
36 |
37 | embed.setAuthor(target.user.username, target.user.displayAvatarURL(), target.user.displayAvatarURL())
38 | .addField('ID', target.id, true)
39 | .setDescription(target.user.toString())
40 | .setThumbnail(target.user.displayAvatarURL())
41 | .addField('Usertag', `\n${target.user.username}#${target.user.discriminator}`, true)
42 | .addField('Is Server Owner', owner, true)
43 | .addField('Status', emote[target.presence.status], true)
44 | .addField('In Voice', inVoice, true)
45 | .addField('Account-Type', isBot, true)
46 | .addField('Registered', formatDate(target.user.createdAt), true)
47 | .addField('Joined', formatDate(target.joinedAt), true)
48 | .addField('Key Permissions', '```prolog\n' + target.permissions.toArray().map(p => p).join('\n') + '```')
49 | // .addField('Game', game, true)
50 | .addField('Roles', target.roles.map(r => r.toString()).join('\n'), true);
51 |
52 | // if (target.presence.game && target.presence.game.assets)
53 | // embed.setImage(target.presence.game.assets.largeImageURL);
54 |
55 | message.channel.send(embed);
56 | },
57 | };
--------------------------------------------------------------------------------
/app/commands/media/belike.js:
--------------------------------------------------------------------------------
1 | const Discord = require('discord.js');
2 | const { gPrefix } = require('../../config.json');
3 | const emote = require('../../util/emote.js');
4 | const { images } = require('../../util/statics.js');
5 |
6 | module.exports = {
7 | name: 'BeLike',
8 | description: 'Show others your coolness and send a Be-Like-Bill Meme',
9 | category: 'media',
10 | documentationURL: 'https://paladin.netlify.com/media/belike.html',
11 | usage: [`${gPrefix}belike`],
12 | args: false,
13 | guildOnly: false,
14 | aliases: ['belike', 'bl'],
15 | cooldown: 30,
16 | params:['`[name]` - The name to show. If not given your name will be choosen'],
17 | arguments: [
18 | { name: 'name', type: String, multiple: true, alias: 'n', defaultOption: true },
19 | { name: 'sex', type: String, alias: 's' },
20 | { name: 'delete', type: Boolean, alias: 'd' },
21 | ],
22 | async execute(message, args) {
23 | const embed = new Discord.MessageEmbed().setColor('#FF00FF');
24 | const sex = args.sex ? args.sex : getSex();
25 | const name = args.name ? args.name : message.author.username;
26 | const url = `https://belikebill.ga/billgen-API.php?default=1&name=${name}&sex=${sex}`;
27 | embed.setImage(url);
28 | message.channel.send(embed);
29 | },
30 | };
31 |
32 | function getSex() {
33 | const choice = ['f', 'm'];
34 | return choice[Math.floor(Math.random() * 2)];
35 | }
--------------------------------------------------------------------------------
/app/commands/misc/embed.js:
--------------------------------------------------------------------------------
1 | const { gPrefix } = require('../../config.json');
2 | const { MessageEmbed} = require('discord.js');
3 | module.exports = {
4 | name: 'Embed',
5 | description: 'Generate a beautiful and easy to create embed powered by [Embed-Visualizer](https://leovoel.github.io/embed-visualizer/)',
6 | category: 'misc',
7 | guildOnly: false,
8 | args: true,
9 | documentationURL: 'https://paladin.netlify.com/misc/embed.html',
10 | usage: [`${gPrefix}embed [message]`, `${gPrefix}embed [json]`],
11 | params: ['[`json]` - The JSON code to convert into an embed', '[`message]` - The message to display in an embed'],
12 | cooldown: 5,
13 | arguments: [
14 | { name: 'msg', type: String, multiple: true, alias: 'm', defaultOption: true },
15 | { name: 'delete', type: Boolean, alias: 'd' },
16 | ],
17 | async execute(message, args) {
18 | try {
19 | message.channel.send(JSON.parse(args.msg.join(' ')));
20 | } catch (e) {
21 | const embed = new MessageEmbed().setColor('#FF00FF');
22 | message.channel.send(embed.setDescription(args.msg.join(' ')));
23 | }
24 | },
25 | };
--------------------------------------------------------------------------------
/app/commands/misc/json.js:
--------------------------------------------------------------------------------
1 | const { gPrefix } = require('../../config.json');
2 | const { postToHastebin } = require('../../util/paladinUtils.js');
3 |
4 | module.exports = {
5 | name: 'Json',
6 | description: 'Get the json code of a MessageEmbed',
7 | category: 'misc',
8 | guildOnly: true,
9 | args: true,
10 | documentationURL: 'https://paladin.netlify.com/misc/json.html',
11 | usage: [`${gPrefix}json [channel-id] [message-id]`],
12 | params: ['[`channel-id` - ID of the channel where the embed is in', '[`message-id` - ID of the message'],
13 | cooldown: 30,
14 | arguments: [
15 | { name: 'msg', type: String, multiple: true, alias: 'i', defaultOption: true },
16 | { name: 'delete', type: Boolean, alias: 'd' },
17 | ],
18 | async execute(message, args) {
19 | const m = args.msg.length === 1 ?
20 | await message.channel.messages.fetch(args.msg[0]).catch(e => e) :
21 | await message.guild.channels.get(args.msg[0]).messages.fetch(args.msg[1]).catch(e => e);
22 |
23 | if (!m || !m.embeds || !m.embeds.length)
24 | return message.channel.send('Message not found or is not a embed');
25 | const json = toJSON(m.content, m.embeds[0]);
26 | postToHastebin(json, 'json', message);
27 | },
28 | };
29 |
30 | function toJSON(content, messageEmbed) {
31 | let json = {};
32 | if (content)
33 | json.content = content;
34 | json.embed = {};
35 | if (messageEmbed.title)
36 | json.embed.title = messageEmbed.title;
37 | if (messageEmbed.description)
38 | json.embed.description = messageEmbed.description;
39 | if (messageEmbed.url)
40 | json.embed.url = messageEmbed.url;
41 | if (messageEmbed.color)
42 | json.embed.color = messageEmbed.color;
43 | if (messageEmbed.timestamp)
44 | json.embed.timestamp = new Date(messageEmbed.timestamp);
45 | if (messageEmbed.footer) {
46 | json.embed.footer = {};
47 | if (messageEmbed.footer.iconURL)
48 | json.embed.footer.icon_url = messageEmbed.footer.iconURL;
49 | if (messageEmbed.footer.text)
50 | json.embed.footer.text = messageEmbed.footer.text;
51 | }
52 | if (messageEmbed.thumbnail) {
53 | json.embed.thumbnail = {};
54 | if (messageEmbed.thumbnail.url)
55 | json.embed.thumbnail.url = messageEmbed.thumbnail.url;
56 | }
57 | if (messageEmbed.image) {
58 | json.embed.image = {};
59 | if (messageEmbed.image.url)
60 | json.embed.image.url = messageEmbed.image.url;
61 | }
62 | if (messageEmbed.author) {
63 | json.embed.author = {};
64 | if (messageEmbed.author.url)
65 | json.embed.author.url = messageEmbed.author.url;
66 | if (messageEmbed.author.name)
67 | json.embed.author.name = messageEmbed.author.name;
68 | if (messageEmbed.author.iconURL)
69 | json.embed.author.icon_url = messageEmbed.author.iconURL;
70 | }
71 | if (messageEmbed.fields)
72 | json.embed.fields = messageEmbed.fields;
73 | return JSON.stringify(json, undefined, 2);
74 | }
--------------------------------------------------------------------------------
/app/commands/moderation/ban.js:
--------------------------------------------------------------------------------
1 | const Discord = require('discord.js');
2 | const { gPrefix } = require('../../config.json');
3 | const emote = require('../../util/emote.js');
4 | const { images } = require('../../util/statics.js');
5 | const { getMember } = require('../../util/paladinUtils.js');
6 |
7 | module.exports = {
8 | name: 'Ban',
9 | description: 'Ban a member from the server. Banned user will get a DM with reason aswell.',
10 | category: 'moderation',
11 | documentationURL: 'https://paladin.netlify.com/moderation/ban.html',
12 | usage: [`\`${gPrefix}ban [@user]\``, `\`${gPrefix}ban [user id]\``, `\`${gPrefix}ban [user-name]\``],
13 | args: true,
14 | guildOnly: true,
15 | userPermissions: ['BAN_MEMBERS'],
16 | botPermissions: ['BAN_MEMBERS'],
17 | examples: [`\`${gPrefix}ban @YINGYANG#7777 \``],
18 | params: [`\`@user\` - the user to ban `, `\`user-id\` - the id of the user to ban`, `\`user-name\` - the name of the user to ban`],
19 | cooldown: 5,
20 | arguments: [
21 | { name: 'msg', type: String, multiple: true, alias: 'm', defaultOption: true },
22 | { name: 'delete', type: Boolean, alias: 'd' },
23 | ],
24 | async execute(message, args) {
25 | const embed = new Discord.MessageEmbed().setColor('#FF00FF');
26 | const target = getMember(message, args.msg);
27 | if (!target)
28 | return message.channel.send('No user found!');
29 |
30 | const highestAuthorRolePosition = message.member.roles.reduce(((a, role) => a > role.position ? a : role.position), 0);
31 | const highestTargetRolePosition = target.roles.reduce(((a, role) => a > role.position ? a : role.position), 0);
32 | const botUser = message.guild.members.find(m => m.id === message.client.user.id);
33 | const highestBotRolePosition = botUser.roles.reduce(((a, role) => a > role.position ? a : role.position), 0);
34 |
35 | const notOwner = !message.guild.ownerID === message.member.id;
36 |
37 | if (highestTargetRolePosition >= highestAuthorRolePosition && notOwner)
38 | return message.channel.send(target.toString() + ' has a role equal or higher than your role!');
39 |
40 | if (highestTargetRolePosition >= highestBotRolePosition)
41 | return message.channel.send('With all respect but ' + target.toString() + ' has a higher or equal role!\nSo I can not ban him.');
42 |
43 | let reason;
44 |
45 | if (message.mentions.users.size > 0 && args.msg.length > 1) {
46 | args.msg.shift();
47 | reason = args.msg.join(' ');
48 | }
49 |
50 | embed.setTitle('Server Member got banned')
51 | .setAuthor(message.author.username, message.author.displayAvatarURL(), message.author.displayAvatarURL())
52 | .addField('Banned Member', target.toString(), true)
53 | .addField('Banned from', message.guild.name, true)
54 | .setThumbnail(target.user.avatarURL())
55 | .setImage(images.ban);
56 |
57 | if (reason)
58 | embed.addField('Reason', reason, true);
59 |
60 | await target.send(embed)
61 | .then(r => embed.addField('Notified', emote.check.mention, true))
62 | .catch(e => embed.addField('Notified', emote.disabled.mention, true));
63 |
64 |
65 | target.ban(reason ? reason : 'Not specified')
66 | .then(r => message.channel.send(embed))
67 | .catch(e => console.log(e) && message.channel.send('Upps something went wrong.\nContact the developer about this!'));
68 | },
69 | };
--------------------------------------------------------------------------------
/app/commands/moderation/channeltopic.js:
--------------------------------------------------------------------------------
1 | const Discord = require('discord.js');
2 | const { gPrefix } = require('../../config.json');
3 | const emote = require('../../util/emote.js');
4 | const { images } = require('../../util/statics.js');
5 | const { getMember } = require('../../util/paladinUtils.js');
6 |
7 | module.exports = {// TODO: Docs
8 | name: 'Channeltopic',
9 | description: 'Change the topic of a channel',
10 | category: 'moderation',
11 | documentationURL: 'https://paladin.netlify.com/moderation/channeltopic.html',
12 | usage: [`\`${gPrefix}channeltopic [topic]\``, 'if no parameter passed then channeltopic will be cleared'],
13 | args: false,
14 | guildOnly: true,
15 | userPermissions: ['MANAGE_CHANNELS'],
16 | botPermissions: ['MANAGE_CHANNELS'],
17 | params: [`\`topic\` - the channel topic `, `You can mention users, roles, channels and use emotes in the topic`],
18 | cooldown: 5,
19 | arguments: [
20 | { name: 'topic', type: String, multiple: true, alias: 't', defaultOption: true },
21 | { name: 'reason', type: String, multiple: true, alias: 'r' },
22 | { name: 'delete', type: Boolean, alias: 'd' },
23 | ],
24 | execute(message, args) {
25 | const topic = args.topic ? args.topic.join(' ') : '';
26 | !args.reason ? message.channel.setTopic(topic) : message.channel.setTopic(topic, args.reason.join(' '))
27 | },
28 | };
--------------------------------------------------------------------------------
/app/commands/moderation/emote.js:
--------------------------------------------------------------------------------
1 | const Discord = require('discord.js');
2 | const { gPrefix } = require('../../config.json');
3 | const emote = require('../../util/emote.js');
4 | const { images } = require('../../util/statics.js');
5 | const { getMember } = require('../../util/paladinUtils.js');
6 |
7 | module.exports = {// TODO: Docs
8 | name: 'Emote',
9 | description: 'Add emotes to your server',
10 | category: 'moderation',
11 | documentationURL: 'https://paladin.netlify.com/moderation/emote.html',
12 | usage: [`\`${gPrefix}emote [emote]\``],
13 | args: false,
14 | guildOnly: true,
15 | userPermissions: ['MANAGE_EMOJIS'],
16 | botPermissions: ['MANAGE_EMOJIS'],
17 | params: [`\`emote\` - emote to add as or url`],
18 | cooldown: 5,
19 | arguments: [
20 | { name: 'msg', type: String, alias: 'm', multiple: true, defaultOption: true },
21 | { name: 'delete', type: Boolean, alias: 'd' },
22 | ],
23 | execute(message, args) {
24 | const embed = new Discord.MessageEmbed().setColor('#FF00FF');
25 | if (args.msg.length !== 2)
26 | return message.channel.send(embed.setDescription('Invalid URL'))
27 |
28 | message.guild.emojis.create(args.msg[1], args.msg[0])
29 | .then(emoji => message.channel.send(embed.setDescription('Successfully added new emote: ' + emoji.toString())))
30 | .catch(e => message.channel.send(embed.setDescription('Invalid URL')));
31 | },
32 | };
--------------------------------------------------------------------------------
/app/commands/moderation/kick.js:
--------------------------------------------------------------------------------
1 | const Discord = require('discord.js');
2 | const { gPrefix } = require('../../config.json');
3 | const emote = require('../../util/emote.js');
4 | const { images } = require('../../util/statics.js');
5 | const { getMember } = require('../../util/paladinUtils.js');
6 |
7 | module.exports = {
8 | name: 'Kick',
9 | description: 'Kick a member from the server. Kicked user will get a DM with reason aswell.',
10 | category: 'moderation',
11 | documentationURL: 'https://paladin.netlify.com/moderation/kick.html',
12 | usage: [`\`${gPrefix}kick [@user]\``, `\`${gPrefix}kick [user id]\``, `\`${gPrefix}kick [user-name]\``],
13 | args: true,
14 | guildOnly: true,
15 | userPermissions: ['KICK_MEMBERS'],
16 | botPermissions: ['KICK_MEMBERS'],
17 | examples: [`\`${gPrefix}kick @YINGYANG#7777 \``],
18 | params: [`\`@user\` - the user to kick `, `\`user-id\` - the id of the user to kick`, `\`user-name\` - the name of the user to kick`],
19 | cooldown: 5,
20 | arguments: [
21 | { name: 'msg', type: String, multiple: true, alias: 'm', defaultOption: true },
22 | { name: 'delete', type: Boolean, alias: 'd' },
23 | ],
24 | async execute(message, args) {
25 | const embed = new Discord.MessageEmbed().setColor('#FF00FF');
26 | const target = getMember(message, args);
27 | if (!target)
28 | return message.channel.send('No user found!');
29 |
30 | const highestAuthorRolePosition = message.member.roles.reduce(((a, role) => a > role.position ? a : role.position), 0);
31 | const highestTargetRolePosition = target.roles.reduce(((a, role) => a > role.position ? a : role.position), 0);
32 | const botUser = message.guild.members.find(m => m.id === message.client.user.id);
33 | const highestBotRolePosition = botUser.roles.reduce(((a, role) => a > role.position ? a : role.position), 0);
34 |
35 | const notOwner = !message.guild.ownerID === message.member.id;
36 |
37 | if (highestTargetRolePosition >= highestAuthorRolePosition && notOwner)
38 | return message.channel.send(target.toString() + ' has a role equal or higher than your role!');
39 |
40 | if (highestTargetRolePosition >= highestBotRolePosition)
41 | return message.channel.send('With all respect but ' + target.toString() + ' has a higher or equal role!\nSo I can not kick him.');
42 |
43 | let reason;
44 |
45 | if (message.mentions.users.size > 0 && args.msg.length > 1) {
46 | args.msg.shift();
47 | reason = args.msg.join(' ');
48 | }
49 |
50 | embed.setTitle('Server Member got kicked')
51 | .setAuthor(message.author.username, message.author.displayAvatarURL(), message.author.displayAvatarURL())
52 | .addField('Kicked Member', target.toString(), true)
53 | .addField('Kicked from', message.guild.name, true)
54 | .setThumbnail(target.user.avatarURL())
55 | .setImage(images.kick);
56 |
57 | if (reason)
58 | embed.addField('Reason', reason, true);
59 |
60 | await target.send(embed)
61 | .then(r => embed.addField('Notified', emote.check.mention, true))
62 | .catch(e => embed.addField('Notified', emote.disabled.mention, true));
63 |
64 | target.kick(reason ? reason : 'Not specified')
65 | .then(r => message.channel.send(embed))
66 | .catch(e => console.log(e) && message.channel.send('Upps something went wrong.\nContact the developer about this!'));
67 | },
68 | };
--------------------------------------------------------------------------------
/app/commands/moderation/purge.js:
--------------------------------------------------------------------------------
1 | const Discord = require('discord.js');
2 | const { gPrefix } = require('../../config.json');
3 |
4 | module.exports = {
5 | name: 'Purge',
6 | description: 'Bulk-delete messages from a channel',
7 | category: 'moderation',
8 | documentationURL: 'https://paladin.netlify.com/moderation/purge.html',
9 | usage: [`\`${gPrefix}purge [number]\``],
10 | args: true,
11 | guildOnly: true,
12 | aliases: ['prune', 'delete', 'wipe'],
13 | userPermissions: ['MANAGE_MESSAGES'],
14 | botPermissions: ['MANAGE_MESSAGES'],
15 | examples: [`\`${gPrefix}purge 30\``],
16 | params: [`\`number\` - The amount of messages you want to delete (between 1 and 99)`],
17 | cooldown: 30,
18 | arguments: [
19 | { name: 'amount', type: Number, alias: 'n', defaultValue: 100, defaultOption: true },
20 | { name: 'bots', type: Boolean, alias: 'b' },
21 | { name: 'pinned', type: Boolean, alias: 'p' },
22 | { name: 'time', type: Number, alias: 't' },
23 | { name: 'delete', type: Boolean, alias: 'd' },
24 | ],
25 | async execute(message, args) {
26 | const embed = new Discord.MessageEmbed().setColor('#FF00FF');
27 |
28 | args.amount = Math.abs(args.amount);
29 | const limit = args.amount && args.amount < 100 ? args.amount : 100;
30 |
31 | let messages = await message.channel.messages.fetch({
32 | limit: limit,
33 | });
34 |
35 | let user;
36 | if (message.mentions.users.size)
37 | user = message.mentions.users.first();
38 |
39 | const filteredMessages = this.filter(messages, user, args.bots, args.pinned, args.time);
40 |
41 | let clearedMessages = await message.channel.bulkDelete(filteredMessages, true);
42 |
43 | if (!clearedMessages.size)
44 | return message.channel.send('there was an error trying to prune messages in this channel!');
45 |
46 | const pinnedMessages = messages.array().filter(m => m.pinned).length;
47 |
48 | embed.setDescription('Deleted').addField('Messages', clearedMessages.size, true)
49 | .addField('Pinned', args.pinned ? pinnedMessages : 0, true)
50 | .addField('From', user ? user : args.bots ? 'Bot' : 'everyone', true);
51 | if (args.time)
52 | embed.addField('Time', 'last ' + args.time + ' minutes.');
53 |
54 | message.channel.send(embed);
55 | },
56 | filter(messages, user, bots, pinned, time) {
57 | if (user)
58 | messages = messages.filter(message => message.author.id === user.id);
59 | else if (bots)
60 | messages = messages.filter(message => message.author.bot);
61 | if (!pinned)
62 | messages = messages.filter(message => !message.pinned);
63 | if (time) {
64 | let requiredTimestamp = messages.createdTimestamp - (args.time * 60 * 1000);
65 | messages = messages.filter(message => message.createdTimestamp >= requiredTimestamp);
66 | }
67 | return messages;
68 | },
69 | };
--------------------------------------------------------------------------------
/app/commands/owner/eval.js:
--------------------------------------------------------------------------------
1 | const Discord = require('discord.js');
2 | const { gPrefix } = require('../../config.json');
3 |
4 | const clean = text => {
5 | if (typeof (text) === 'string') {
6 | return text.replace(/`/g, '`' + String.fromCharCode(8203)).replace(/@/g, '@' + String.fromCharCode(8203));
7 | }
8 | else {
9 | return text;
10 | }
11 | };
12 | module.exports = {
13 | name: 'Eval',
14 | description: 'Evaluate Javascript code',
15 | usage: [`\`${gPrefix}eval [Javascript Code]\``],
16 | cooldown: 1,
17 | args: true,
18 | guildOnly: false,
19 | category: 'owner',
20 | userPermissions: ['BOT_OWNER'],
21 | params: ['`[Javascript code]` - Your Javascript code to execute.'],
22 | documentationURL: 'https://paladin.netlify.com/owner/eval.html',
23 | examples: [
24 | `\`${gPrefix}eval Math.pow(5, 8)\``,
25 | `\`${gPrefix}eval 5 + 6\``,
26 | `\`${gPrefix}eval message.client.guilds.map(g=>g.name).join('\\n')\``,
27 | ],
28 | arguments: [
29 | { name: 'code', type: String, multiple: true, alias: 'c', defaultOption: true },
30 | { name: 'delete', type: Boolean, alias: 'd' },
31 | ],
32 | execute(message, args) { //TODO: for all shards
33 |
34 | const code = args.code.join(' ');
35 | let evaled = eval(code);
36 | try {
37 | if (typeof evaled !== 'string')
38 | evaled = require('util').inspect(evaled);
39 | const embed = new Discord.MessageEmbed().setColor('#FF00FF')
40 | .addField('Input', `\` ${message.content} \``, false)
41 | .addField('Output', clean(evaled), false);
42 |
43 | message.channel.send(embed);
44 |
45 | } catch (err) {
46 | message.channel.send(`\`ERROR\` \`\`\`xl\n${clean(err)}\n\`\`\``);
47 | }
48 | },
49 | };
--------------------------------------------------------------------------------
/app/commands/owner/exec.js:
--------------------------------------------------------------------------------
1 | const { MessageEmbed } = require('discord.js');
2 | const { gPrefix } = require('../../config.json');
3 | const util = require('util');
4 | const exec = util.promisify(require('child_process').exec);
5 |
6 | module.exports = {
7 | name: 'Exec',
8 | description: 'Execute something on the command line the bot is running on',
9 | usage: [`\`${gPrefix}exec [command line commands]\``],
10 | cooldown: 1,
11 | guildOnly: false,
12 | args: true,
13 | params: ['`[command]` - Command to execute in terminal'],
14 | category: 'owner',
15 | userPermissions: ['BOT_OWNER'],
16 | documentationURL: 'https://paladin.netlify.com/owner/exec.html',
17 | examples: [
18 | `\`${gPrefix}exec ls\``,
19 | ],
20 | arguments: [
21 | { name: 'command', type: String, multiple: true, alias: 'c', defaultOption: true },
22 | { name: 'delete', type: Boolean, alias: 'd' },
23 | ],
24 | async execute(message, args) {
25 |
26 | const embed = new MessageEmbed().setColor('#FF00FF');
27 | const trim = (str, max) => ((str.length > max) ? `${str.slice(0, max - 3)}...` : str);
28 |
29 | if (!args.command)
30 | return message.channel.send('No arguments given');
31 |
32 | args = args.command.join(' ');
33 |
34 | let res;
35 | res = await exec(args, { timeout: 60 * 1000 }).catch(e => e);
36 | const stdout = res.stdout;
37 | const stderr = res.stderr;
38 |
39 | let output;
40 |
41 | stdout ? output = `\`${trim(stdout, 1000)}\`` : stderr ? output = `\`${trim(stdout, 1000)}\`` :
42 | '```bash\nExecuted successfully without output```';
43 |
44 | if (output.length <= 2)
45 | output = `Failed to execute!`;
46 |
47 | return message.channel.send(embed.setDescription(output));
48 | },
49 | };
--------------------------------------------------------------------------------
/app/commands/owner/leaveServer.js:
--------------------------------------------------------------------------------
1 | const Discord = require('discord.js');
2 | const { gPrefix } = require('../../config.json');
3 |
4 | module.exports = {
5 | name: 'LeaveServer',
6 | description: 'Let the bot leave a Server',
7 | category: 'owner',
8 | documentationURL: 'https://paladin.netlify.com/owner/leaveServer.html',
9 | args: true,
10 | guildOnly: false,
11 | aliases: ['leaveGuild', 'leaveguild'],
12 | usage: [`\`${gPrefix}leaveServer [server_id]\``],
13 | userPermissions: ['BOT_OWNER'],
14 | params: ['`[server_id]` - The id of the server to leave'],
15 | cooldown: 1,
16 | arguments: [
17 | { name: 'serverid', type: String, defaultOption: true },
18 | { name: 'delete', type: Boolean, alias: 'd' },
19 | ],
20 | async execute(message, args) {
21 | console.log(args);
22 | const embed = new Discord.MessageEmbed().setColor('#FF00FF');
23 | let result = await message.client.shard.broadcastEval(`this.guilds.get('${args.serverid}') && this.guilds.get('${args.serverid}').leave().catch(console.error)`);
24 | result = result.filter(e => e != null);
25 | if (result.length > 0)
26 | return message.channel.send(embed.setDescription('Successfully left the server!'));
27 |
28 | message.channel.send(embed.setDescription('Server not found'));
29 | },
30 | };
--------------------------------------------------------------------------------
/app/commands/owner/setActivity.js:
--------------------------------------------------------------------------------
1 | const Discord = require('discord.js');
2 | const { gPrefix } = require('../../config.json');
3 |
4 | module.exports = {
5 | name: 'SetActivity',
6 | description: 'Change Paladin\'s activity',
7 | usage: [`\`${gPrefix}setActivity [activity]\``],
8 | cooldown: 1,
9 | args: true,
10 | guildOnly: false,
11 | category: 'owner',
12 | userPermissions: ['BOT_OWNER'],
13 | params: ['`[activity]` - The message to display'],
14 | documentationURL: 'https://paladin.netlify.com/owner/setActivity.html',
15 | arguments: [
16 | { name: 'msg', type: String, alias: 'm', multiple: true, defaultOption: true },
17 | { name: 'type', type: String, alias: 't', defaultValue: 'PLAYING' },
18 | { name: 'url', type: String, alias: 'u' },
19 | { name: 'delete', type: Boolean, alias: 'd' },
20 | ],
21 | async execute(message, args) {
22 |
23 | const embed = new Discord.MessageEmbed().setColor('#FF00FF');
24 | /** available types
25 | PLAYING
26 | STREAMING
27 | LISTENING
28 | WATCHING
29 | */
30 | try {
31 | !args.url ? await message.client.user.setActivity(args.msg.join(' '), { type: args.type })
32 | : await message.client.user.setActivity(args.msg.join(' '), { type: args.type, url: args.url });
33 | } catch (e) {
34 | await message.client.user.setActivity(args._unknown.join(' '), { type: args.type }).catch(console.error);
35 | }
36 | message.channel.send(embed.setDescription('You have successfully changed my activity!'));
37 | },
38 | };
--------------------------------------------------------------------------------
/app/commands/owner/setAvatar.js:
--------------------------------------------------------------------------------
1 | const Discord = require('discord.js');
2 | const { gPrefix } = require('../../config.json');
3 |
4 | module.exports = {
5 | name: 'SetAvatar',
6 | description: 'Change Paladin\'s avatar',
7 | usage: [`\`${gPrefix}setAvatar [avatar_url]\``],
8 | cooldown: 1,
9 | args: true,
10 | guildOnly: false,
11 | category: 'owner',
12 | userPermissions: ['BOT_OWNER'],
13 | params: ['`[avatar_url]` - The url of your avatar'],
14 | documentationURL: 'https://paladin.netlify.com/owner/setAvatar.html',
15 | arguments: [
16 | { name: 'url', type: String, alias: 'c', defaultOption: true },
17 | { name: 'delete', type: Boolean, alias: 'd' },
18 | ],
19 | async execute(message, args) {
20 | const embed = new Discord.MessageEmbed().setColor('#FF00FF')
21 | const regex = /^(https?:\/\/)((([-a-z0-9]{1,})?(-?)+[-a-z0-9]{1,})(\.))+([a-z]{1,63})\/((([a-z0-9._\-~#%])+\/)+)?([a-z0-9._\-~#%]+)\.(jpg|jpeg|gif|png|bmp)$/i.test(args.url);
22 |
23 | if (!regex)
24 | return message.channel.send(embed.setDescription('Invalid URL'));
25 |
26 | await message.client.user.setAvatar(args.url)
27 | message.channel.send(embed.setDescription('You have successfully changed my avatar!'));
28 | },
29 | };
--------------------------------------------------------------------------------
/app/commands/owner/setNickname.js:
--------------------------------------------------------------------------------
1 | const Discord = require('discord.js');
2 | const { gPrefix } = require('../../config.json');
3 |
4 | module.exports = {
5 | name: 'SetNickname',
6 | description: 'Change Paladin\'s username',
7 | usage: [`\`${gPrefix}setNickname [name]\``],
8 | cooldown: 1,
9 | args: true,
10 | guildOnly: false,
11 | category: 'owner',
12 | userPermissions: ['BOT_OWNER'],
13 | params: ['`[name]` - Paladin\'s new nickname', '`[reason]` - for audit-logs (optional)'],
14 | documentationURL: 'https://paladin.netlify.com/owner/setNickname.html',
15 | arguments: [
16 | { name: 'name', type: String, multiple: true, alias: 'n', defaultOption: true },
17 | { name: 'reason', type: String, multiple: true, alias: 'r'}, // For audit logs
18 | { name: 'delete', type: Boolean, alias: 'd' },
19 | ],
20 | async execute(message, args) {
21 | const embed = new Discord.MessageEmbed().setColor('#FF00FF')
22 | const reason = args.reason ? args.reason.join(' ') : '';
23 | message.guild.me.setNickname(args.name.join(' '), reason).then(
24 | message.channel.send(embed.setDescription('You have successfully changed my nickname!'))
25 | ).catch(e => e)
26 |
27 | },
28 | };
--------------------------------------------------------------------------------
/app/commands/owner/setUsername.js:
--------------------------------------------------------------------------------
1 | const Discord = require('discord.js');
2 | const { gPrefix } = require('../../config.json');
3 |
4 | module.exports = {
5 | name: 'SetUsername',
6 | description: 'Change Paladin\'s username',
7 | usage: [`\`${gPrefix}setUsername [name]\``],
8 | cooldown: 1,
9 | args: true,
10 | guildOnly: false,
11 | category: 'owner',
12 | userPermissions: ['BOT_OWNER'],
13 | params: ['`[name]` - Paladin\'s new username'],
14 | documentationURL: 'https://paladin.netlify.com/owner/setUsername.html',
15 | arguments: [
16 | { name: 'name', type: String, multiple: true, alias: 'n', defaultOption: true },
17 | { name: 'delete', type: Boolean, alias: 'd' },
18 | ],
19 | async execute(message, args) {
20 | const embed = new Discord.MessageEmbed().setColor('#FF00FF')
21 | await message.client.user.setUsername(args.name.join(' ')).then(
22 | message.channel.send(embed.setDescription('You have successfully changed my username!'))
23 | ).catch(e => e)
24 | },
25 | };
--------------------------------------------------------------------------------
/app/commands/owner/ssh.js:
--------------------------------------------------------------------------------
1 | const { MessageEmbed } = require('discord.js');
2 | const { host } = require('../../config.json');
3 | const { gPrefix } = require('../../config.json');
4 | const emote = require('../../util/emote.js');
5 | const SSH = require('ssh2-promise');
6 |
7 | module.exports = {
8 | name: 'SSH',
9 | description: 'Execute commands using SSH. Mainly used to execute script like start, restart and update',
10 | usage: [`\`${gPrefix}ssh [command line commands]\``],
11 | cooldown: 1,
12 | guildOnly: false,
13 | args: true,
14 | params: ['`[command]` - Command to execute in host\'s terminal'],
15 | category: 'owner',
16 | userPermissions: ['BOT_OWNER'],
17 | documentationURL: 'https://paladin.netlify.com/owner/ssh.html',
18 | examples: [
19 | `\`${gPrefix}ssh sudo apt-get update\``,
20 | `\`${gPrefix}ssh ls\``,
21 | `\`${gPrefix}ssh cd PaladinJS && ls\``,
22 | `\`${gPrefix}ssh sh start.sh\``,
23 | `\`${gPrefix}ssh sh restart.sh\``,
24 | `\`${gPrefix}ssh sh update.sh\``,
25 | `\`${gPrefix}ssh cd PaladinJS && sh start.sh\``,
26 | `\`${gPrefix}ssh cd PaladinJS && sh restart.sh\``,
27 | `\`${gPrefix}ssh cd PaladinJS && sh update.sh\``,
28 | `\`${gPrefix}ssh cd PaladinJS && sh stop.sh\``,
29 | `\`${gPrefix}ssh sh restart.sh && cd PaladinJS && sh update.sh\``,
30 | ],
31 | arguments: [
32 | { name: 'command', type: String, multiple: true, alias: 'c', defaultOption: true },
33 | { name: 'delete', type: Boolean, alias: 'd' },
34 | ],
35 | async execute(message, args) {
36 | const embed = new MessageEmbed().setColor('#FF00FF');
37 | const trim = (str, max) => ((str.length > max) ? `${str.slice(0, max - 3)}...` : str);
38 |
39 | const ssh = new SSH({
40 | host: host.ip,
41 | username: host.username,
42 | password: host.password,
43 | });
44 |
45 | const command = args._unknown ? args.command.join(' ') + ' ' + args._unknown.join(' ') : args.command.join(' ')
46 | ssh.connect().then(embed.setFooter('Connection established', emote.check.url))
47 | .catch(() => embed.setFooter(' Connection Failed!', emote.xmark.url));
48 | const data = await ssh.exec(command).catch(e => e);
49 | data ? embed.setDescription(`\`${trim(data, 1000)}\``) : embed.setDescription('Executed without output');
50 | message.channel.send(embed);
51 | },
52 | };
--------------------------------------------------------------------------------
/app/commands/search/dictionary.js:
--------------------------------------------------------------------------------
1 | const { MessageEmbed, MessageAttachment } = require('discord.js');
2 | const { gPrefix } = require('../../config.json');
3 | const { images } = require('../../util/statics.js');
4 | const fetch = require('node-fetch');
5 |
6 | module.exports = {
7 | name: 'Dictionary',
8 | description: 'A oxford dictionary lookup to get the definition of a word',
9 | category: 'search',
10 | documentationURL: 'https://paladin.netlify.com/search/dictionary.html',
11 | usage: [`\`${gPrefix}define [search-term]\``],
12 | args: true,
13 | guildOnly: false,
14 | aliases: ['define', 'dic'],
15 | examples: [`${gPrefix}define ace`],
16 | params: ['`[search-term]` - Your query string'],
17 | cooldown: 10,
18 | arguments: [
19 | { name: 'word', type: String, multiple: true, alias: 'c', defaultOption: true },
20 | { name: 'delete', type: Boolean, alias: 'd' },
21 | ],
22 | async execute(message, args) {
23 |
24 | const embed = new MessageEmbed();
25 |
26 | const app_id = '4f5d735f';
27 | const app_key = 'e679f7ec77cc18a1949785656e4dc29c';
28 | const lang = 'en';
29 | const url = `https://od-api.oxforddictionaries.com:443/api/v1/entries/${lang}/${args.word.join(' ').toLowerCase()}`;
30 | embed.setColor('#FF00FF').setDescription(`Definition for **${args.word.join(' ').toUpperCase()}**`);
31 |
32 | let audioFile;
33 |
34 | const response = await fetch(url, {
35 | headers: {
36 | Accept: 'application/json',
37 | app_key: app_key,
38 | app_id: app_id,
39 | },
40 | });
41 |
42 | let json;
43 | let senses;
44 |
45 | try {
46 | json = await response.json().then(r => r['results'][0]['lexicalEntries'][0]);
47 | senses = json['entries'][0]['senses'];
48 | } catch (e) {
49 | return message.channel.send(embed.setDescription('Word not found'));
50 | }
51 | embed.setThumbnail(images.oxford_dictionary);
52 | for (let i = 0; i < senses.length; i++) {
53 | let domain;
54 | let example;
55 | let definition;
56 | try {
57 | domain = senses[i]['domains'][0];
58 | } catch (e) {
59 | }
60 | try {
61 | definition = senses[i]['definitions'][0];
62 | } catch (e) {
63 | }
64 | try {
65 | example = senses[i]['examples'][0]['text'];
66 | } catch (e) {
67 | }
68 | if (definition)
69 | embed.addField(`Definition ${i + 1} ${domain ? '#' + domain : ''}`,
70 | `${definition}\n\n${example ? '__Example:__\n' : ''}${example ? example : ''}`);
71 | }
72 | try {
73 | audioFile = json['pronunciations'][0]['audioFile'];
74 | } catch (e) {
75 | }
76 | if (audioFile)
77 | return message.channel.send({ embed, files: [audioFile] });
78 | message.channel.send(embed);
79 | },
80 | };
--------------------------------------------------------------------------------
/app/commands/search/google.js:
--------------------------------------------------------------------------------
1 | const Discord = require('discord.js');
2 | const { gPrefix, google_search_engine_id, google_api_key } = require('../../config.json');
3 | const fetch = require('node-fetch');
4 | // get your google_search_engine_id from here -> https://cse.google.com
5 | module.exports = {
6 | name: 'Google',
7 | description: 'Google a word',
8 | category: 'search',
9 | documentationURL: 'https://paladin.netlify.com/search/google.html',
10 | usage: [`\`${gPrefix}google [search-term]\``],
11 | args: true,
12 | guildOnly: false,
13 | aliases: ['g'],
14 | examples: ['`-g malaka`'],
15 | params: ['`[search-term]` - Your query string'],
16 | cooldown: 5,
17 | arguments: [
18 | { name: 'query', type: String, multiple: true, alias: 'q', defaultOption: true },
19 | { name: 'delete', type: Boolean, alias: 'd' },
20 | ],
21 | execute(message, args) {
22 |
23 | const url = `https://www.googleapis.com/customsearch/v1?q=${args.query.join(' ')}&cx=${google_search_engine_id}&key=${google_api_key}`;
24 |
25 | fetch(url, {
26 | headers: {
27 | Accept: 'application/json',
28 | },
29 | }).then(res => res.json()).then(response => {
30 | try {
31 | message.channel.send(response['items'][0]['link']);
32 | } catch (e) {
33 | message.channel.send('Nothing found');
34 | }
35 | }).catch(console.error);
36 | },
37 | };
--------------------------------------------------------------------------------
/app/commands/search/lmgtfy.js:
--------------------------------------------------------------------------------
1 | const { gPrefix } = require('../../config.json');
2 |
3 | module.exports = {
4 | name: 'LMGTFY',
5 | description: 'Act like a smartass and provide a https://googleitfor.me link with your search query.',
6 | category: 'search',
7 | guildOnly: false,
8 | args: true,
9 | documentationURL: 'https://paladin.netlify.com/search/lmgtfy.html',
10 | usage: [`${gPrefix}lmgtfy [search-term]`],
11 | aliases: ['lmgify'],
12 | params: ['[`search term` - Your query string'],
13 | cooldown: 5,
14 | arguments: [
15 | { name: 'query', type: String, multiple: true, alias: 'q', defaultOption: true },
16 | { name: 'delete', type: Boolean, alias: 'd' },
17 | ],
18 | execute(message, args) {
19 | const url = 'https://lmgtfy.com/?q=' + args.query.join('+');
20 | message.channel.send(url);
21 | },
22 | };
--------------------------------------------------------------------------------
/app/commands/search/urban.js:
--------------------------------------------------------------------------------
1 | const { MessageEmbed, MessageAttachment } = require('discord.js');
2 | const { gPrefix } = require('../../config.json');
3 | const { images } = require('../../util/statics.js');
4 | const querystring = require('querystring');
5 | const fetch = require('node-fetch');
6 |
7 | module.exports = {
8 | name: 'Urban',
9 | description: 'Query the Urban Dictionary API',
10 | category: 'search',
11 | documentationURL: 'https://paladin.netlify.com/search/urban.html',
12 | usage: [`\`${gPrefix}urban [search-term]\``],
13 | args: true,
14 | guildOnly: false,
15 | aliases: ['urban-dictionary', 'urb'],
16 | examples: [`${gPrefix}urban [loli]`],
17 | params: ['`[search-term]` - Your query string'],
18 | cooldown: 10,
19 | arguments: [
20 | { name: 'query', type: String, multiple: true, alias: 'q', defaultOption: true },
21 | { name: 'delete', type: Boolean, alias: 'd' },
22 | ],
23 | async execute(message, args) {
24 |
25 | const embed = new MessageEmbed();
26 |
27 | const nsfwChannels = message.guild.channels.filter(c => c.nsfw);
28 |
29 | if (!message.channel.nsfw)
30 | return message.channel.send(embed.setTitle('This not a NSFW Channel. Please go to a NSFW Channel!')
31 | .setImage(images.nsfw)
32 | .setDescription(`**This server has ${nsfwChannels.size} NSFW channels**\n${nsfwChannels.map(c => c.toString()).join(', ')}`));
33 |
34 | const query = querystring.stringify({ term: args.query.join(' ') });
35 | const response = await fetch(`https://api.urbandictionary.com/v0/define?${query}`);
36 | const jsonArray = await response.json().then(r => r['list']);
37 | const urbanObject = jsonArray[0];
38 |
39 | if (!jsonArray.length)
40 | return message.channel.send(`No results found for **${args.query.join(' ')}**.`);
41 |
42 | const trim = (str, max) => ((str.length > max) ? `${str.slice(0, max - 3)}...` : str);
43 |
44 | embed.setColor('#FF00FF')
45 | .setTitle(urbanObject.word)
46 | .setURL(urbanObject.permalink)
47 | .addField('Definition', trim(urbanObject.definition, 1024));
48 | if (urbanObject.exmaple)
49 | embed.addField('Example', trim(urbanObject.example, 1024));
50 | embed.addField('\uD83D\uDC4D', urbanObject.thumbs_up, true)
51 | .addField('\uD83D\uDC4E ', urbanObject.thumbs_down, true);
52 | if (urbanObject.sound_urls.length > 0) {
53 | embed.addField('Sound files', urbanObject.sound_urls.map((file, index) => `[sound ${index + 1}](${file})`));
54 | const attachment = new MessageAttachment(urbanObject.sound_urls[0]);
55 | return message.channel.send({ embed, files: [attachment] });
56 | }
57 | message.channel.send(embed);
58 | },
59 | };
--------------------------------------------------------------------------------
/app/commands/test/prefix.js:
--------------------------------------------------------------------------------
1 | const { gPrefix } = require('../config.json');
2 | const { guildModel } = require('../sequelize.js');
3 |
4 | module.exports = {
5 | name: 'Prefix',
6 | description: 'Set new prefix',
7 | aliases: [],
8 | usage: `${gPrefix}prefix [new prefix]`,
9 | cooldown: 5,
10 | args: true,
11 | guildOnly: true,
12 | category: 'undefined',
13 | userPermissions: ['MANAGE_GUILD'],
14 | botPermissions: [],
15 | documentationURL: '',
16 | arguments: [
17 | { name: 'prefix', type: String, multiple: true, alias: 'p', defaultOption: true },
18 | ],
19 | async execute(message, args) {
20 | message.client.prefixes.set(message.guild.id, args.prefix[0]);
21 | const update = await guildModel.update({ prefix: args.prefix[0] }, { where: { id: message.guild.id } });
22 | message.channel.send(`New Prefix is ${args.prefix[0]}`)
23 | },
24 | };
--------------------------------------------------------------------------------
/app/commands/test/quote.js:
--------------------------------------------------------------------------------
1 | const Discord = require('discord.js');
2 | const { gPrefix } = require('../../config.json');
3 |
4 | module.exports = {
5 | name: 'Quote',
6 | description: '',
7 | category: 'moderation',
8 | documentationURL: 'https://paladin.netlify.com/moderation/purge.html',
9 | usage: [`\`${gPrefix}purge [number]\``],
10 | args: true,
11 | guildOnly: true,
12 | aliases: ['prune', 'delete', 'wipe'],
13 | userPermissions: ['MANAGE_MESSAGES'],
14 | botPermissions: ['MANAGE_MESSAGES'],
15 | examples: [`\`${gPrefix}purge 30\``],
16 | params: [`\`number\` - The amount of messages you want to delete (between 1 and 99)`],
17 | cooldown: 30,
18 | arguments: [
19 | { name: 'msg', type: String, multiple: true, alias: 'm', defaultOption: true },
20 | { name: 'delete', type: Boolean, alias: 'd' },
21 | ],
22 | async execute(message, args) {
23 | const embed = new Discord.MessageEmbed().setColor('#FF00FF');
24 |
25 | let channel = message.channel;
26 |
27 | if (args.msg.length < 1) {
28 | throw 'You must provide a message ID';
29 | }
30 |
31 | if (!/^\d{18}$/.test(args.msg[0])) {
32 | throw 'You must provide a valid message ID.';
33 | }
34 |
35 | if (args.msg[1] && /^<#\d{18}>$|^\d{18}$/.test(args.msg[1])) {
36 | channel = message.client.channels.get(args.msg[1].replace(/[<#>]/g, ''));
37 | }
38 |
39 | if (!channel) {
40 | throw 'That channel could not be found!';
41 | }
42 |
43 | const messages = await channel.messages.fetch({ around: args.msg[0], limit: 1 });
44 |
45 | if (!messages || messages.size < 1) {
46 | throw 'That message could not be found!';
47 | }
48 |
49 | let msg = messages.first();
50 |
51 | let options = {
52 | timestamp: msg.editedTimestamp || msg.createdTimestamp,
53 | footer: false,
54 | };
55 |
56 | let attachment = msg.attachments.first();
57 |
58 | if (attachment && (attachment.width || attachment.height)) {
59 | options.image = attachment.url;
60 | }
61 |
62 | let field = '';
63 |
64 | if ((message.guild || {}).id !== (channel.guild || {}).id) {
65 | field = `**in ${(channel.guild || { name: 'DMs' }).name} <#${channel.id}>:**`;
66 | }
67 | else if (channel.id !== msg.channel.id) {
68 | field = `**in <#${channel.id}>:**`;
69 | }
70 |
71 | message.delete();
72 | message.channel.send(msg.content);
73 | },
74 | };
--------------------------------------------------------------------------------
/app/config.json.EXAMPLE:
--------------------------------------------------------------------------------
1 | {
2 | "gPrefix": "--",
3 | "token": "",
4 | "botOwners": ["246974486665101313", "394154377100787714"],
5 | "database": "postgresql://DB_USER_NAME:DB_USER_PW@IP:PORT/DB_NAME",
6 | "google_search_engine_id": "",
7 | "google_api_key": "",
8 | "commandsEnabled": false,
9 | "host": {
10 | "ip": "",
11 | "username": "",
12 | "password": ""
13 | }
14 | }
--------------------------------------------------------------------------------
/app/index.js:
--------------------------------------------------------------------------------
1 |
2 | const { ShardingManager } = require('discord.js');
3 | const { token } = require('./config.json');
4 | const manager = new ShardingManager('./paladin.js', { totalShards: 'auto', token: token });
5 | // const manager = new ShardingManager('./paladin.js', { token: token });
6 |
7 | manager.spawn();
8 |
9 | manager.on('message', (shard, message) => {
10 | console.log(`Shard[${shard.id}] : ${message._eval} : ${message._result}`);
11 | });
12 |
13 | manager.on('shardCreate', shard => console.log(`Launched shard ${shard.id}`));
--------------------------------------------------------------------------------
/app/models/commandsModel.js:
--------------------------------------------------------------------------------
1 | module.exports = (db, Sequelize) => {
2 | return db.define('commands', {
3 | id: {
4 | type: Sequelize.TEXT,
5 | primaryKey: true,
6 | autoIncrement: false,
7 | allowNull: false,
8 | },
9 | name: {
10 | type: Sequelize.TEXT,
11 | primaryKey: true,
12 | allowNull: false,
13 | },
14 | category: {
15 | type: Sequelize.TEXT,
16 | allowNull: false,
17 | },
18 | description: {
19 | type: Sequelize.TEXT,
20 | allowNull: false,
21 | },
22 | enabled: {
23 | type: Sequelize.BOOLEAN,
24 | defaultValue: true,
25 | allowNull: false,
26 | },
27 | bannedChannels: {
28 | type: Sequelize.ARRAY(Sequelize.TEXT),
29 | defaultValue: [],
30 | allowNull: false,
31 | },
32 | bannedRoles: {
33 | type: Sequelize.ARRAY(Sequelize.TEXT),
34 | defaultValue: [],
35 | allowNull: false,
36 | },
37 | });
38 | };
--------------------------------------------------------------------------------
/app/models/guildModel.js:
--------------------------------------------------------------------------------
1 | module.exports = (db, Sequelize) => {
2 | return db.define('guilds', {
3 | id: {
4 | type: Sequelize.TEXT,
5 | primaryKey: true,
6 | unique: true,
7 | autoIncrement: false,
8 | allowNull: false,
9 | },
10 | prefix: {
11 | type: Sequelize.TEXT,
12 | allowNull: false,
13 | },
14 | name: {
15 | type: Sequelize.TEXT,
16 | allowNull: false,
17 | },
18 | welcomeMessage: {
19 | type: Sequelize.TEXT,
20 | allowNull: false,
21 | },
22 | welcomeAvatar: {
23 | type: Sequelize.TEXT,
24 | allowNull: false,
25 | },
26 | ticketMessage: {
27 | type: Sequelize.TEXT,
28 | allowNull: false,
29 | },
30 | welcomeDM: {
31 | type: Sequelize.BOOLEAN,
32 | defaultValue: false,
33 | allowNull: false,
34 | },
35 | ticketChannel: {
36 | type: Sequelize.TEXT,
37 | allowNull: false,
38 | },
39 | });
40 | };
--------------------------------------------------------------------------------
/app/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "paladinjs",
3 | "version": "1.0.0",
4 | "description": "Paladin in JS",
5 | "main": "index.js",
6 | "scripts": {
7 | "dev": "nodemon index.js",
8 | "start": "node index.js"
9 | },
10 | "author": "",
11 | "license": "ISC",
12 | "dependencies": {
13 | "axios": "^0.18.0",
14 | "colors": "^1.3.3",
15 | "command-line-args": "^5.1.1",
16 | "discord.js": "github:discordjs/discord.js",
17 | "eslint": "^5.16.0",
18 | "node-fetch": "^2.3.0",
19 | "nodemon": "^1.18.11",
20 | "pg": "^7.10.0",
21 | "sequelize": "^5.7.1",
22 | "sequelize-cli": "^5.4.0",
23 | "speedtest-net": "^1.5.1",
24 | "ssh2-promise": "^0.1.3"
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/app/sequelize.js:
--------------------------------------------------------------------------------
1 | const Sequelize = require('sequelize');
2 | const commands = require('./models/commandsModel.js');
3 | const guilds = require('./models/guildModel.js');
4 | const config = require('./config.json');
5 | require('colors');
6 |
7 | // Database connection
8 | const dbinfo = `${config.database}`;
9 |
10 | const sequelize = new Sequelize(config.database, {
11 | dialect: 'postgres',
12 | logging: false,
13 | operatorsAliases: false,
14 | });
15 |
16 | sequelize.authenticate().then(() => console.log(`Connected to ${dbinfo}`.blue.bold))
17 | .catch(err => console.error(`Unable to connect to the database:`.red.bold, err));
18 |
19 | const commandModel = commands(sequelize, Sequelize);
20 | const guildModel = guilds(sequelize, Sequelize);
21 |
22 | const sync = async () => {
23 | console.log('Synchronized database');
24 | // const sync = await sequelize.sync({force: true});
25 | await sequelize.sync();
26 | };
27 |
28 | sync();
29 |
30 | module.exports = {
31 | commandModel,
32 | guildModel,
33 | };
34 |
--------------------------------------------------------------------------------
/app/util/emote.js:
--------------------------------------------------------------------------------
1 | const { Paladin } = require('./statics.js');
2 |
3 | module.exports = {
4 | online: '<:online:461806237659693066>',
5 | offline: '<:offline:461806229325611009>',
6 | dnd: '<:dnd:461806211470458881>',
7 | idle: '<:idle:461806221700235285>',
8 | streaming: '<:streaming:461806252423643137>',
9 | disabled: { mention: '<:disabled:441336029857710100>', id: 441336029857710100 },
10 | enabled: ' <:enabled:441336020886224923>',
11 | on: '<:on:458446538344235012>',
12 | off: ' <:off:458446500478058496>',
13 | check: { mention: '<:check:458010117397544961>', id: '458010117397544961', url: 'https://cdn.discordapp.com/emojis/458010117397544961.png?v=1'},
14 | xmark: { mention: '<:xmark:458010105280069632>', id: '458010105280069632', url: 'https://cdn.discordapp.com/emojis/458010105280069632.png?v=1'},
15 | member: '<:member:546039253755232256>',
16 | hypesquad: '<:hypesquad:441194511922626561>',
17 | botTag: '<:botTag:458446427027275776>',
18 | cursor: '',
19 | toggle: '<:toggle:463831285236891667>',
20 | discord_default: '<:discord_default:462576212305510411>',
21 | discord_white: ' <:discord_white:462576201513435145>',
22 | vue: '<:vue:545991555941662720>',
23 | pin: '',
24 | node: '<:node:546836671422005268>',
25 | ubuntu: '<:ubuntu:467938264591106048>',
26 | paladin: ' <:paladin:444485534212161546>',
27 | webstorm: '<:webstorm:546835563890868234>',
28 | discord_js: '<:discordjs:546838905186549761>',
29 | loading: { mention: '', id: 499871882586357761 },
30 | };
31 |
--------------------------------------------------------------------------------
/app/util/paladinUtils.js:
--------------------------------------------------------------------------------
1 | const emote = require('./emote.js');
2 | const config = require('../config.json');
3 | const Discord = require('discord.js');
4 |
5 | module.exports = {
6 | getMember(message, args) {
7 | if (message.mentions.users.size > 0)
8 | return target = message.guild.members.get(message.mentions.users.first().id);
9 |
10 | if (args) {
11 | target = message.guild.members.find(m => m.user.username === args.join(' '));
12 | if (!target)
13 | target = message.guild.members.find(m => m.user.id === args.join(' '));
14 | return target;
15 | }
16 | return message.guild.members.find(m => m.id === message.author.id);
17 | },
18 | getUser(message, args) {
19 | if (message.mentions.users.size > 0)
20 | return target = message.mentions.users.first();
21 | if (args) {
22 | target = message.client.users.find(u => u && u.username === args.join(' '));
23 | if (!target)
24 | target = message.client.users.find(u => u && u.id === args.join(' '));
25 | return target;
26 | }
27 | return message.author;
28 | },
29 | getRole(message, args) {
30 | if (message.mentions.roles.size > 0)
31 | return target = message.mentions.roles.first();
32 | if (args) {
33 | target = message.guild.roles.find(r => r && r.name === args.join(' '));
34 | if (!target)
35 | target = message.guild.roles.find(r => r && r.id === args.join(' '));
36 | return target;
37 | }
38 | },
39 | getChannel(message, args) {
40 | if (message.mentions.channels.size > 0)
41 | return target = message.mentions.channels.first();
42 | if (args) {
43 | target = message.guild.channels.find(c => c && c.name === args.join(' '));
44 | if (!target)
45 | target = message.guild.channels.find(c => c && c.id === args.join(' '));
46 | return target;
47 | }
48 | return message.channel;
49 | },
50 | booldReaction(message, bool) {
51 | return bool ? emote.on : emote.off;
52 | },
53 | formatDate(str) {
54 | return str.toISOString().slice(0, 10).split('-').reverse().join('.');
55 | },
56 | hasCoolDown(command, cooldowns, message, isBotOwner) {
57 | // handling cooldowns
58 |
59 | if (isBotOwner) return false;
60 |
61 | if (!cooldowns.has(command.name))
62 | cooldowns.set(command.name, new Discord.Collection());
63 | const now = Date.now();
64 | const timestamps = cooldowns.get(command.name);
65 | const cooldownAmount = (command.cooldown || 3) * 1000;
66 |
67 | if (timestamps.has(message.author.id)) {
68 | const expirationTime = timestamps.get(message.author.id) + cooldownAmount;
69 |
70 | if (now < expirationTime) {
71 | const timeLeft = (expirationTime - now) / 1000;
72 | message.author.send(`Please wait ${timeLeft.toFixed(1)} more second(s) before reusing the \`${command.name}\` command.`);
73 | return true;
74 | }
75 | }
76 | timestamps.set(message.author.id, now);
77 | setTimeout(() => timestamps.delete(message.author.id), cooldownAmount);
78 | return false;
79 | },
80 | postToHastebin(code, extension, message) {
81 | const axios = require('axios');
82 | if (!code)
83 | return console.log('Input argument is required.');
84 | axios.post('https://hastebin.com/documents', code)
85 | .then(body => {
86 | const url = 'https://hastebin.com/' + body.data.key + ((extension) ? '.' + extension : '');
87 | message.channel.send('I have pasted your code to Hastebin:\n' + url);
88 | }).catch(e => message.channel.send('Failed to upload ot hastebin.com'));
89 | },
90 | };
--------------------------------------------------------------------------------
/app/util/statics.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | images: {
3 | helpImage: 'https://cdn.discordapp.com/attachments/396964573007052800/455461842144198687/Wow_question_mark.gif',
4 | PaladinAvatar: 'https://cdn.discordapp.com/attachments/396964573007052800/492135654919241739/PaladinMainAvatar.png',
5 | nsfw: 'https://cdn.discordapp.com/attachments/396964573007052800/546463916780290068/nsfw.gif',
6 | oxford_dictionary: 'https://cdn.discordapp.com/attachments/396964573007052800/466201818997850113/1200x630bb.png',
7 | shield: 'https://cdn.discordapp.com/attachments/396964573007052800/505372681751756840/paladinShield.gif',
8 | loading: 'https://cdn.discordapp.com/emojis/499871882586357761.gif?v=1',
9 | hypesquad: 'https://cdn.discordapp.com/attachments/396964573007052800/547160416107626497/HypeSquad.png',
10 | splash: 'https://cdn.discordapp.com/attachments/396964573007052800/547342790904774671/Loading.gif',
11 | kick: 'https://media1.giphy.com/media/xT5LMDzs9xYtHXeItG/giphy.gif',
12 | ban: 'https://cdn.discordapp.com/attachments/396964573007052800/535899018635771904/ban5CUT.gif',
13 | },
14 | Paladin: {
15 | discordServerID: '393207704211947521',
16 | },
17 | docs: {
18 | category: {
19 | information: 'https://ylngyang.github.io/PaladinJS/information/',
20 | owner: 'https://ylngyang.github.io/PaladinJS/owner/',
21 | },
22 | },
23 | };
24 |
--------------------------------------------------------------------------------
/docs/.gitignore:
--------------------------------------------------------------------------------
1 | node_modules
2 | public
3 | package-lock.json
4 | yarn.lock
5 | yarn-error.log
--------------------------------------------------------------------------------
/docs/docs/.vuepress/components/DiscordInvite.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
You’ve been invited to join
5 |
6 |
7 |
Paladin Bot
8 |
be awesome!
9 |
10 |
11 | Join
12 |
13 |
14 |
15 |
16 |
17 |
87 |
--------------------------------------------------------------------------------
/docs/docs/.vuepress/components/DiscordWidget.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
Offical Server
4 |
5 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/docs/docs/.vuepress/components/Expansion.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | fas fa-code
6 |
7 |
8 | {{title}}
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
37 |
38 |
--------------------------------------------------------------------------------
/docs/docs/.vuepress/components/Hint.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
![]()
4 |
{{title}}
5 |
{{text}}
6 |
7 |
8 |
9 |
38 |
39 |
--------------------------------------------------------------------------------
/docs/docs/.vuepress/components/IconTextCard.vue:
--------------------------------------------------------------------------------
1 |
2 |
14 |
15 |
16 | lock
17 |
18 |
locked
19 |
20 |
21 |
22 |
![]()
23 |
24 |
25 |
26 |
27 |
{{title}}
28 |
{{description}}
29 |
30 |
31 |
32 |
33 |
34 |
76 |
77 |
171 |
172 |
--------------------------------------------------------------------------------
/docs/docs/.vuepress/components/ImageCard.vue:
--------------------------------------------------------------------------------
1 |
2 |
12 |
13 | {{hoverText}}
14 | {{title}}
15 |
16 |
17 |
18 |
19 |
61 |
62 |
90 |
91 |
--------------------------------------------------------------------------------
/docs/docs/.vuepress/components/PaladinStats.vue:
--------------------------------------------------------------------------------
1 |
2 |
21 |
22 |
23 |
26 |
--------------------------------------------------------------------------------
/docs/docs/.vuepress/components/example/IconTextCardExample.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
23 |
24 |
70 |
--------------------------------------------------------------------------------
/docs/docs/.vuepress/components/example/ImageCardExample.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
65 |
66 |
--------------------------------------------------------------------------------
/docs/docs/.vuepress/components/index.js:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/BaroDevelopment/PaladinJS/7a2e84a68303f995d9aea79a71724f855483faab/docs/docs/.vuepress/components/index.js
--------------------------------------------------------------------------------
/docs/docs/.vuepress/config.js:
--------------------------------------------------------------------------------
1 | const sidebar = require('./sidebar.js');
2 |
3 | const config = {
4 | title: 'Paladin Documentation',
5 | description: 'A Multipurpose Premium Discord Bot with unique features.',
6 | markdown: {
7 | lineNumbers: false,
8 | },
9 | base: '/docs/',
10 | dest: 'public',
11 | head: [
12 | ['link', { rel: 'icon', href: '/favicon.png' }],
13 | ['link', { rel: 'stylesheet', href: 'https://fonts.googleapis.com/css?family=Roboto:100,300,400,500,700,900|Material+Icons' }],
14 | ['link', { rel: 'stylesheet', href: 'https://use.fontawesome.com/releases/v5.0.13/css/all.css' }],
15 | ['link', { rel: 'stylesheet', href: 'https://cdn.jsdelivr.net/npm/vuetify/dist/vuetify.min.css' }],
16 | ['meta', {
17 | name: 'viewport',
18 | content: 'width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no, minimal-ui',
19 | }],
20 | ['script', { src: 'https://cdn.jsdelivr.net/npm/@widgetbot/crate@3', async: true, defer: true }, `
21 | const button = new Crate({
22 | location: ['bottom', 'left'],
23 | server: '391946504509587476',
24 | channel: '501484507585708038',
25 | shard: 'https://disweb.deploys.io'
26 | })
27 | button.notify({
28 | content: 'Need a hand? Leave a message!',
29 | timeout: 3000,
30 | })
31 | `],
32 | ],
33 | plugins: [
34 | '@vuepress/nprogress',
35 | '@vuepress/medium-zoom',
36 | '@vuepress/plugin-back-to-top',
37 | '@vuepress/plugin-nprogress',
38 | 'tabs',
39 | ['mathjax', {
40 | target: 'svg',
41 | presets: [
42 | '\\def\\lr#1#2#3{\\left#1#2\\right#3}',
43 | ],
44 | macros: {
45 | '*': '\\times',
46 | '\\Z': '\\mathbb{Z}',
47 | '\\R': '\\mathbb{R}',
48 | '\\N': '\\mathbb{N}',
49 | '\\Q': '\\mathbb{Q}',
50 | },
51 | }],
52 | ['container', {
53 | type: 'tip',
54 | defaultTitle: {
55 | '/zh/': '提示',
56 | },
57 | }],
58 | ['container', {
59 | type: 'warning',
60 | defaultTitle: {
61 | '/zh/': '注意',
62 | },
63 | }],
64 | ['container', {
65 | type: 'danger',
66 | defaultTitle: {
67 | '/zh/': '警告',
68 | },
69 | }],
70 | ['container', {
71 | type: 'info',
72 | defaultTitle: {
73 | '/zh/': '警告',
74 | },
75 | }],
76 | ['container', {
77 | type: 'vue',
78 | before: '',
79 | after: '
',
80 | defaultTitle: {
81 | '/zh/': '警告',
82 | },
83 | }],
84 | ],
85 | themeConfig: {
86 | repo: 'BaroDevelopment/PaladinJS',
87 | docsDir: 'docs/docs/',
88 | editLinks: true,
89 | sidebarDepth: 0,
90 | lastUpdated: true,
91 | displayAllHeaders: true,
92 | logo: 'https://cdn.discordapp.com/attachments/396964573007052800/492135654919241739/PaladinMainAvatar.png',
93 | algolia: {
94 | apiKey: '9923ebe5f42cc67f0904b3ea6e5cd718',
95 | indexName: 'paladinbot',
96 | },
97 | nav: [
98 | {
99 | text: 'Home',
100 | link: '/',
101 | },
102 | {
103 | text: 'Docs',
104 | link: '/welcome',
105 | },
106 | {
107 | text: 'VuePress',
108 | link: '/usage/',
109 | },
110 | ],
111 | sidebar,
112 | },
113 | };
114 |
115 | module.exports = config;
--------------------------------------------------------------------------------
/docs/docs/.vuepress/noopModule.js:
--------------------------------------------------------------------------------
1 | export default {}
2 |
--------------------------------------------------------------------------------
/docs/docs/.vuepress/sidebar.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | '/usage/': [
3 | {
4 | title: 'Home',
5 | collapsable: false,
6 | children: ['/'],
7 | },
8 | {
9 | title: 'Vuepress',
10 | icon: 'fab fa-vuejs',
11 | collapsable: true,
12 | children: [
13 | '/usage/vuepress',
14 | '/usage/markdown',
15 | '/usage/cards',
16 | '/usage/container',
17 | '/usage/latex'
18 | ],
19 | },
20 | {
21 | title: 'Javascript',
22 | icon: 'fab fa-discord',
23 | collapsable: true,
24 | children: ['/usage/discordjs/'],
25 | },
26 | {
27 | title: 'Monitoring',
28 | collapsable: true,
29 | icon: 'fas fa-desktop',
30 | children: ['/usage/monitoring'],
31 | },
32 | ],
33 | '/': [
34 | {
35 | title: 'Home',
36 | collapsable: false,
37 | children: ['/', 'welcome'],
38 | icon: 'dashboard'
39 | },
40 | {
41 | title: 'Owner Commands',
42 | collapsable: true,
43 | icon: 'code',
44 | children: [
45 | '/owner/eval',
46 | '/owner/ssh',
47 | '/owner/exec',
48 | '/owner/setAvatar',
49 | '/owner/setActivity',
50 | '/owner/leaveServer',
51 | '/owner/setUsername',
52 | '/owner/setNickname',
53 | ],
54 | },
55 | {
56 | title: 'Moderation Commands',
57 | collapsable: true,
58 | icon: 'gavel',
59 | children: [
60 | '/moderation/kick',
61 | '/moderation/ban',
62 | '/moderation/purge',
63 | '/moderation/channeltopic',
64 | '/moderation/emote',
65 | ],
66 | },
67 | {
68 | title: 'Misc Commands',
69 | collapsable: true,
70 | icon: 'table_chart',
71 | children: [
72 | '/misc/json',
73 | ],
74 | },
75 | {
76 | title: 'Media Commands',
77 | collapsable: true,
78 | icon: 'camera',
79 | children: [
80 | '/media/belike',
81 | ],
82 | },
83 | {
84 | title: 'Search Commands',
85 | collapsable: true,
86 | icon: 'search',
87 | children: [
88 | '/search/google',
89 | '/search/lmgtfy',
90 | '/search/urban',
91 | '/search/dictionary',
92 | ],
93 | },
94 | {
95 | title: 'Information Commands',
96 | icon: 'info',
97 | collapsable: true,
98 | children: [
99 | '/information/help',
100 | '/information/avatar',
101 | '/information/userinfo',
102 | '/information/serverinfo',
103 | '/information/roleinfo',
104 | '/information/emojiinfo',
105 | '/information/botinfo',
106 | '/information/channelinfo',
107 | '/information/shardinfo',
108 | '/information/afk',
109 | '/information/ping',
110 | '/information/uptime',
111 | '/information/speedtest',
112 | ],
113 | },
114 | ],
115 | };
--------------------------------------------------------------------------------
/docs/docs/.vuepress/theme/LICENSE:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 |
3 | Copyright (c) 2018-present, Yuxi (Evan) You
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in
13 | all copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21 | THE SOFTWARE.
22 |
--------------------------------------------------------------------------------
/docs/docs/.vuepress/theme/components/API.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | Name |
7 | Type |
8 | Parameters |
9 | Description |
10 | default |
11 |
12 |
13 |
14 |
15 | {{tr.name}} |
16 | {{tr.type}} |
17 | {{tr.parameters}} |
18 | {{tr.description}} |
19 | {{tr.default}} |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
46 |
47 |
--------------------------------------------------------------------------------
/docs/docs/.vuepress/theme/components/DropdownTransition.vue:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 |
10 |
11 |
12 |
28 |
29 |
34 |
--------------------------------------------------------------------------------
/docs/docs/.vuepress/theme/components/Footer.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | {{ item.icon }}
7 | {{ item.text }}
8 |
9 |
10 | ©2019 — Paladin
11 |
12 |
13 |
14 |
15 |
16 |
48 |
49 |
--------------------------------------------------------------------------------
/docs/docs/.vuepress/theme/components/Home.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
26 |
27 |
31 |
36 |
{{ feature.title }}
37 |
{{ feature.details }}
38 |
39 |
40 |
41 |
42 |
43 |
49 |
50 |
51 |
52 |
72 |
73 |
163 |
--------------------------------------------------------------------------------
/docs/docs/.vuepress/theme/components/NavLink.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 | {{ item.text }}
4 |
5 |
6 |
11 |
12 |
22 |
25 | {{ item.text }}
26 |
27 |
28 |
29 |
30 |
60 |
61 |
65 |
--------------------------------------------------------------------------------
/docs/docs/.vuepress/theme/components/NavLinks.vue:
--------------------------------------------------------------------------------
1 |
2 |
32 |
33 |
34 |
116 |
117 |
150 |
--------------------------------------------------------------------------------
/docs/docs/.vuepress/theme/components/Navbar.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
22 |
23 |
24 |
25 |
27 |
28 | Paladin Bot
29 |
30 |
31 |
32 |
33 |
34 |
35 |
39 |
40 |
41 | {{item.title}}
42 |
43 |
44 |
50 |
51 |
52 |
53 | {{child.title}}
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
97 |
98 |
119 |
--------------------------------------------------------------------------------
/docs/docs/.vuepress/theme/components/Sidebar.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
9 |
10 |
11 |
23 |
24 |
61 |
--------------------------------------------------------------------------------
/docs/docs/.vuepress/theme/components/SidebarButton.vue:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
9 |
28 |
--------------------------------------------------------------------------------
/docs/docs/.vuepress/theme/components/SidebarGroup.vue:
--------------------------------------------------------------------------------
1 |
2 |
54 |
55 |
56 |
71 |
72 |
130 |
--------------------------------------------------------------------------------
/docs/docs/.vuepress/theme/components/SidebarLink.vue:
--------------------------------------------------------------------------------
1 |
79 |
80 |
110 |
--------------------------------------------------------------------------------
/docs/docs/.vuepress/theme/components/SidebarLinks.vue:
--------------------------------------------------------------------------------
1 |
2 |
22 |
23 |
24 |
87 |
--------------------------------------------------------------------------------
/docs/docs/.vuepress/theme/enhanceApp.js:
--------------------------------------------------------------------------------
1 | import Vuetify from 'vuetify';
2 | import pageComponents from '@internal/page-components'
3 |
4 | // Helpers
5 | import colors from 'vuetify/es5/util/colors'
6 |
7 | export default ({Vue, options, router, siteData,}) => {
8 | Vue.use(Vuetify, {
9 | theme: {
10 | primary: colors.blue.accent1
11 | }
12 | });
13 | for (const [name, component] of Object.entries(pageComponents)) {
14 | Vue.component(name, component)
15 | }
16 | }
--------------------------------------------------------------------------------
/docs/docs/.vuepress/theme/global-components/Badge.vue:
--------------------------------------------------------------------------------
1 |
25 |
26 |
45 |
--------------------------------------------------------------------------------
/docs/docs/.vuepress/theme/index.js:
--------------------------------------------------------------------------------
1 | const path = require('path')
2 |
3 | // Theme API.
4 | module.exports = (options, ctx) => ({
5 | alias () {
6 | const { themeConfig, siteConfig } = ctx
7 | // resolve algolia
8 | const isAlgoliaSearch = (
9 | themeConfig.algolia
10 | || Object.keys(siteConfig.locales && themeConfig.locales || {})
11 | .some(base => themeConfig.locales[base].algolia)
12 | )
13 | return {
14 | '@AlgoliaSearchBox': isAlgoliaSearch
15 | ? path.resolve(__dirname, 'components/AlgoliaSearchBox.vue')
16 | : path.resolve(__dirname, 'noopModule.js')
17 | }
18 | },
19 |
20 | plugins: [
21 | ['@vuepress/active-header-links', options.activeHeaderLinks],
22 | '@vuepress/search',
23 | ]
24 | })
25 |
--------------------------------------------------------------------------------
/docs/docs/.vuepress/theme/layouts/404.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
404
5 |
{{ getMsg() }}
6 |
Take me home.
7 |
8 |
9 |
10 |
11 |
27 |
--------------------------------------------------------------------------------
/docs/docs/.vuepress/theme/noopModule.js:
--------------------------------------------------------------------------------
1 | export default {}
2 |
--------------------------------------------------------------------------------
/docs/docs/.vuepress/theme/styles/arrow.styl:
--------------------------------------------------------------------------------
1 | @require './config'
2 |
3 | .arrow
4 | display inline-block
5 | width 0
6 | height 0
7 | &.up
8 | border-left 4px solid transparent
9 | border-right 4px solid transparent
10 | border-bottom 6px solid $arrowBgColor
11 | &.down
12 | border-left 4px solid transparent
13 | border-right 4px solid transparent
14 | border-top 6px solid $arrowBgColor
15 | &.right
16 | border-top 4px solid transparent
17 | border-bottom 4px solid transparent
18 | border-left 6px solid $arrowBgColor
19 | &.left
20 | border-top 4px solid transparent
21 | border-bottom 4px solid transparent
22 | border-right 6px solid $arrowBgColor
23 |
--------------------------------------------------------------------------------
/docs/docs/.vuepress/theme/styles/code.styl:
--------------------------------------------------------------------------------
1 | code
2 | color $codeColor
3 | padding 0.25rem 0.5rem
4 | margin 0
5 | font-size 0.85em
6 | background-color rgba(27,31,35,0.05)
7 | border-radius 3px
8 | .token
9 | &.deleted
10 | color #EC5975
11 | &.inserted
12 | color $accentColor
13 |
14 | pre, pre[class*="language-"]
15 | line-height 1.4
16 | padding 1.25rem 1.5rem
17 | margin 0.85rem 0
18 | background-color $codeBgColor
19 | border-radius 6px
20 | overflow auto
21 | code
22 | color lighten($textColor, 40%)
23 | padding 0
24 | background-color transparent
25 | border-radius 0
26 | box-shadow none
27 |
28 | div[class*="language-"]
29 | position relative
30 | background-color $codeBgColor
31 | //border-radius 6px
32 | .highlight-lines
33 | user-select none
34 | padding-top 1.3rem
35 | position absolute
36 | top 0
37 | left 0
38 | width 100%
39 | line-height 1.4
40 | .highlighted
41 | background-color rgba(0, 0, 0, 66%)
42 | pre, pre[class*="language-"]
43 | background transparent
44 | position relative
45 | z-index 1
46 | &::before
47 | position absolute
48 | z-index 3
49 | top 0.8em
50 | right 1em
51 | font-size 0.75rem
52 | color rgba(255, 255, 255, 0.4)
53 | &:not(.line-numbers-mode)
54 | .line-numbers-wrapper
55 | display none
56 | &.line-numbers-mode
57 | .highlight-lines .highlighted
58 | position relative
59 | &:before
60 | content ' '
61 | position absolute
62 | z-index 3
63 | left 0
64 | top 0
65 | display block
66 | width $lineNumbersWrapperWidth
67 | height 100%
68 | background-color rgba(0, 0, 0, 66%)
69 | pre
70 | padding-left $lineNumbersWrapperWidth + 1 rem
71 | vertical-align middle
72 | .line-numbers-wrapper
73 | position absolute
74 | top 0
75 | width $lineNumbersWrapperWidth
76 | text-align center
77 | color rgba(255, 255, 255, 0.3)
78 | padding 1.25rem 0
79 | line-height 1.4
80 | br
81 | user-select none
82 | .line-number
83 | position relative
84 | z-index 4
85 | user-select none
86 | font-size 0.85em
87 | &::after
88 | content ''
89 | position absolute
90 | z-index 2
91 | top 0
92 | left 0
93 | width $lineNumbersWrapperWidth
94 | height 100%
95 | border-radius 6px 0 0 6px
96 | border-right 1px solid rgba(0, 0, 0, 66%)
97 | background-color $codeBgColor
98 |
99 |
100 | for lang in $codeLang
101 | div{'[class~="language-' + lang + '"]'}
102 | &:before
103 | content ('' + lang)
104 |
105 | div[class~="language-javascript"]
106 | &:before
107 | content "js"
108 |
109 | div[class~="language-typescript"]
110 | &:before
111 | content "ts"
112 |
113 | div[class~="language-markup"]
114 | &:before
115 | content "html"
116 |
117 | div[class~="language-markdown"]
118 | &:before
119 | content "md"
120 |
121 | div[class~="language-json"]:before
122 | content "json"
123 |
124 | div[class~="language-ruby"]:before
125 | content "rb"
126 |
127 | div[class~="language-python"]:before
128 | content "py"
129 |
130 | div[class~="language-bash"]:before
131 | content "sh"
132 |
133 | div[class~="language-php"]:before
134 | content "php"
135 |
--------------------------------------------------------------------------------
/docs/docs/.vuepress/theme/styles/custom-blocks.styl:
--------------------------------------------------------------------------------
1 | $tipGreen = #42b983;
2 | $warningYellow = #ffe564;
3 | $dangerRed = #ff3331;
4 | $infoBlue = #00b3ff;
5 |
6 | pre.vue-container
7 | border-left-width: .5rem;
8 | border-left-style: solid;
9 | border-color: #42b983;
10 | border-radius: 0px;
11 | & > code
12 | font-size: 14px !important;
13 | & > p
14 | margin: -5px 0 -20px 0;
15 | code
16 | background-color: #42b983 !important;
17 | margin: 3px 5px;
18 | border-radius: 3px;
19 | color #000
20 | em
21 | color #808080
22 | font-weight light
23 |
24 |
25 | .custom-block
26 | .custom-block-title
27 | font-weight 600
28 | margin-bottom 7px
29 | &.tip, &.warning, &.danger, &.info
30 | padding .1rem 1.5rem
31 | border-left-width .5rem
32 | border-left-style solid
33 | margin 1rem 0
34 | p
35 | margin-top 16px !important
36 | &.tip
37 | color: lighten($tipGreen, 50%);
38 | background-color: alpha($tipGreen, 0.15)
39 | border-color $tipGreen
40 | .custom-block-title
41 | color: lighten($tipGreen, 20%);
42 | a
43 | color darken($tipGreen, 20%);
44 | &.info
45 | color: lighten($infoBlue, 50%)
46 | background-color: alpha($infoBlue, 0.20) !important
47 | border-color $infoBlue
48 | .custom-block-title
49 | color: lighten($infoBlue, 20%);
50 | a
51 | color darken($infoBlue, 20%);
52 | &.warning
53 | background-color: alpha($warningYellow, 0.2) !important
54 | border-color darken($warningYellow, 35%)
55 | color: lighten($warningYellow, 40%);
56 | .custom-block-title
57 | color darken($warningYellow, 30%)
58 | a
59 | color darken($warningYellow, 20%);
60 | &.danger
61 | background-color: desaturate(darken($dangerRed, 60%), 70%)
62 | border-color darken($dangerRed, 20%)
63 | color: lighten($dangerRed, 50%);
64 | .custom-block-title
65 | color: darken($dangerRed, 5%);
66 | a
67 | color: darken($dangerRed, 5%);
68 |
69 | @media (max-width: $MQMobile)
70 | .custom-block
71 | img
72 | display: block
73 | margin: 15px auto 15px 0 !important
74 | float: none !important
--------------------------------------------------------------------------------
/docs/docs/.vuepress/theme/styles/hero.styl:
--------------------------------------------------------------------------------
1 | .home
2 | .hero
3 | .action-button
4 | background-color: $accentColor !important
5 | &:hover
6 | color: $accentColor !important
7 | font-weight bold
8 | background-color: white !important
9 | .description
10 | color desaturate(lighten($bg-color, 50%), 50%) !important
11 | .features .footer
12 | border-top-color desaturate(lighten($bg-color, 10%), 10%) !important
13 | .feature
14 | h2
15 | color desaturate(lighten($bg-color, 70%), 40%) !important
16 | p
17 | color desaturate(lighten($bg-color, 50%), 50%) !important
18 | .footer
19 | color desaturate(lighten($bg-color, 50%), 50%) !important
20 | border-image url("https://cdn.discordapp.com/attachments/396964573007052800/547342790904774671/Loading.gif") 100% 0 0 0 !important
21 | .features
22 | border-image url("https://cdn.discordapp.com/attachments/396964573007052800/547342790904774671/Loading.gif") 100% 0 0 0 !important
--------------------------------------------------------------------------------
/docs/docs/.vuepress/theme/styles/index.styl:
--------------------------------------------------------------------------------
1 | @require './code'
2 | @require './custom-blocks'
3 | @require './arrow'
4 | @require './wrapper'
5 | @require './toc'
6 | @require './sidebar'
7 | @require './hero'
8 | @require '~vuepress-plugin-tabs/dist/themes/default.styl'
9 |
10 | html, body
11 | padding 0
12 | margin 0
13 | background-color $bg-color
14 |
15 | body
16 | font-family -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif
17 | -webkit-font-smoothing antialiased
18 | -moz-osx-font-smoothing grayscale
19 | font-size 16px
20 | color $textColor
21 |
22 | .page
23 | //padding-left $sidebarWidth + 10
24 | //padding-right $sidebarWidth + 10
25 | padding-top 80px
26 |
27 | .content:not(.custom)
28 | @extend $wrapper
29 | > *:first-child
30 | margin-top $navbarHeight
31 | p.demo
32 | padding 1rem 1.5rem
33 | border 1px solid #ddd
34 | border-radius 4px
35 | img
36 | max-width 100%
37 |
38 | .content.custom
39 | padding 0
40 | margin 0
41 | img
42 | max-width 100%
43 |
44 | a
45 | font-weight 500
46 | //color $urlColor !important
47 | text-decoration none
48 |
49 | p a code
50 | font-weight 400
51 | color $accentColor
52 |
53 | kbd
54 | background #eee
55 | border solid 0.15rem #ddd
56 | border-bottom solid 0.25rem #ddd
57 | border-radius 0.15rem
58 | padding 0 0.15em
59 |
60 | blockquote
61 | font-size 16px
62 | color $textColor
63 | border-left: 0.25rem solid #00caca;
64 | margin 0.5rem 0
65 | padding .25rem 0 .25rem 1rem
66 | background-color desaturate(lighten($bg-color, 5%), 30%)
67 | & > p
68 | margin 0
69 |
70 | ul, ol
71 | padding-left 1.2em
72 |
73 | strong
74 | font-weight 600
75 |
76 | h1, h2, h3, h4, h5, h6
77 | font-weight 600
78 | line-height 1.25
79 | margin-top 12px
80 | margin-bottom 5px
81 | .content:not(.custom) > &
82 | margin-top (0.5rem - $navbarHeight) !important
83 | padding-top ($navbarHeight + 1rem)
84 | margin-bottom 0
85 | &:first-child
86 | margin-top -1.5rem
87 | margin-bottom 1rem
88 | + p, + pre, + .custom-block
89 | margin-top 2rem
90 | &:hover .header-anchor
91 | opacity: 1
92 |
93 | h1
94 | font-size 2.2rem
95 |
96 | h2
97 | font-size 1.65rem
98 | padding-bottom .3rem
99 | border-bottom 1px solid $borderColor
100 |
101 | h3
102 | font-size 1.35rem
103 |
104 | img
105 | user-select: none
106 | &[alt='avatar']
107 | max-width: 70px !important
108 | border-radius: 100%
109 | float: left
110 | margin-right: 30px
111 | margin-top: 15px
112 |
113 | &[alt='logo']
114 | max-width: 275px !important
115 | margin-left: 0
116 |
117 | a.header-anchor
118 | font-size 0.85em
119 | float left
120 | margin-left -0.87em
121 | padding-right 0.23em
122 | margin-top 0.125em
123 | opacity 0
124 | &:hover
125 | text-decoration none
126 |
127 | code, kbd, .line-number
128 | font-family source-code-pro, Menlo, Monaco, Consolas, "Courier New", monospace
129 |
130 | p, ul, ol
131 | line-height 1.7
132 |
133 | /*
134 | hr
135 | border 0
136 | border-top 1px solid $borderColor
137 | border-image url("https://cdn.discordapp.com/attachments/396964573007052800/547342790904774671/Loading.gif") 100% 0 0 0;
138 | */
139 |
140 | table
141 | border-collapse collapse
142 | margin 1rem 0
143 | display: block
144 | overflow-x: auto
145 |
146 | tr
147 | border-top 1px solid #dfe2e5
148 | &:nth-child(2n)
149 | background-color lighten($bg-color, 10%)
150 |
151 | th, td
152 | border 1px solid $borderColor
153 | padding .6em 1em
154 |
155 | .go-to-top
156 | color: $accentColor !important
157 | &:hover
158 | color: lighten($accentColor, 30%) !important
159 |
160 |
161 | .theme-container
162 | &.sidebar-open
163 | .sidebar-mask
164 | display: block
165 | &.no-navbar
166 | .content:not(.custom) > h1, h2, h3, h4, h5, h6
167 | margin-top 1.5rem
168 | padding-top 0
169 | .sidebar
170 | top 0
171 |
172 | .tabs-component-panels, .tabs-component-tab-a
173 | background-color $bg-color
174 | font-size 1rem
175 |
176 | .tabs-component-tab-a
177 | &:hover
178 | color $accentColor
179 | font-weight revert
180 | a
181 | text-underline none !important
182 |
183 | .tabs-component-tab.is-disabled *
184 | color darken($textColor, 30%)
185 |
186 | mjx-container[jax="SVG"] > svg
187 | font-size: 1.2em
188 |
189 | mjx-container[jax="SVG"] > svg
190 | &:hover
191 | color black
192 | background-color: #ffffff
193 |
194 | @media (min-width: ($MQMobile + 1px))
195 | .theme-container.no-sidebar
196 | .sidebar
197 | display none
198 |
199 |
200 | @require 'mobile.styl'
201 |
--------------------------------------------------------------------------------
/docs/docs/.vuepress/theme/styles/mobile.styl:
--------------------------------------------------------------------------------
1 | @require './config'
2 |
3 | $mobileSidebarWidth = $sidebarWidth * 0.82
4 |
5 | // narrow desktop / iPad
6 | @media (max-width: $MQNarrow)
7 | .sidebar
8 | font-size 15px
9 | width $mobileSidebarWidth
10 | .page
11 | padding-left $mobileSidebarWidth
12 |
13 | // wide mobile
14 | @media (max-width: $MQMobile)
15 | .sidebar
16 | top 0
17 | padding-top $navbarHeight
18 | transform translateX(-100%)
19 | transition transform .2s ease
20 | .page
21 | padding-left 0
22 | .theme-container
23 | &.sidebar-open
24 | .sidebar
25 | transform translateX(0)
26 | &.no-navbar
27 | .sidebar
28 | padding-top: 0
29 |
30 | // narrow mobile
31 | @media (max-width: $MQMobileNarrow)
32 | h1
33 | font-size 1.9rem
34 | .content
35 | div[class*="language-"]
36 | margin 0.85rem -1.5rem
37 | border-radius 0
38 |
--------------------------------------------------------------------------------
/docs/docs/.vuepress/theme/styles/palette.styl:
--------------------------------------------------------------------------------
1 | $accentColor = #0076fc
2 | $textColor = #ababab
3 | $borderColor = #ababab
4 | $codeBgColor = #1c1c1c;
5 | $codeColor = #fc52fb
6 | $arrowBgColor = $accentColor
7 | $nprogressColor = $accentColor
8 | $blockquote = cyan
9 | $bg-color = #151515
10 | $urlColor = #ffffff
11 | $contentWidth = 1000px
--------------------------------------------------------------------------------
/docs/docs/.vuepress/theme/styles/sidebar.styl:
--------------------------------------------------------------------------------
1 | .sidebar
2 | font-size 16px
3 | background-color $bg-color
4 | width $sidebarWidth
5 | position fixed
6 | z-index 10
7 | margin 0
8 | top $navbarHeight
9 | left 0
10 | bottom 0
11 | box-sizing border-box
12 | border-right 1px solid $borderColor
13 | overflow-y auto
14 | .nav-links
15 | border-bottom-color desaturate(lighten($accentColor, 10%), 10%)
16 | border-right-color desaturate(lighten($accentColor, 10%), 10%)
17 | a
18 | &:hover,
19 | &:focus,
20 | &.active
21 | border-left-color desaturate(lighten($accentColor, 10%), 10%)
22 | .sidebar-heading
23 | color desaturate(lighten($bg-color, 80%), 50%)
24 | &.open,
25 | &:hover
26 | color desaturate(lighten($accentColor, 10%), 10%)
27 | a.sidebar-link
28 | color desaturate(lighten($bg-color, 80%), 50%)
29 | &:hover,
30 | &:focus,
31 | &.active
32 | color $accentColor
33 |
34 | .sidebar-mask
35 | position fixed
36 | z-index 9
37 | top 0
38 | left 0
39 | width 100vw
40 | height 100vh
41 | display none
42 |
--------------------------------------------------------------------------------
/docs/docs/.vuepress/theme/styles/toc.styl:
--------------------------------------------------------------------------------
1 | .table-of-contents
2 | .badge
3 | vertical-align middle
4 |
--------------------------------------------------------------------------------
/docs/docs/.vuepress/theme/styles/wrapper.styl:
--------------------------------------------------------------------------------
1 | $wrapper
2 | max-width $contentWidth
3 | margin 0 auto
4 | padding 2rem 2.5rem
5 | @media (max-width: $MQNarrow)
6 | padding 2rem
7 | @media (max-width: $MQMobileNarrow)
8 | padding 1.5rem
--------------------------------------------------------------------------------
/docs/docs/README.md:
--------------------------------------------------------------------------------
1 | ---
2 | home: true
3 | heroText: Paladin Bot Docs
4 | heroImage: https://cdn.discordapp.com/attachments/396964573007052800/492135654919241739/PaladinMainAvatar.png
5 | tagline: Upgrade your Discord Server today!
6 | actionText: Get Started →
7 | actionLink: /welcome
8 | lang: en-US
9 | features:
10 | - title: Music Bot
11 | details: Enjoy good quality music with your friends and control Paladin with reactions.
12 | - title: (Auto)Moderation Bot
13 | details: Get full control over your server using Paladin.
14 | - title: Logging Bot
15 | details: Monitor everything in your server!
16 | footer: Paladin Bot Copyright © 2019
17 | ---
18 |
--------------------------------------------------------------------------------
/docs/docs/images/branding/banner-alt-transparent.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/BaroDevelopment/PaladinJS/7a2e84a68303f995d9aea79a71724f855483faab/docs/docs/images/branding/banner-alt-transparent.png
--------------------------------------------------------------------------------
/docs/docs/images/branding/banner-large.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/BaroDevelopment/PaladinJS/7a2e84a68303f995d9aea79a71724f855483faab/docs/docs/images/branding/banner-large.png
--------------------------------------------------------------------------------
/docs/docs/images/branding/banner-small.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/BaroDevelopment/PaladinJS/7a2e84a68303f995d9aea79a71724f855483faab/docs/docs/images/branding/banner-small.png
--------------------------------------------------------------------------------
/docs/docs/images/branding/banner-transparent.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/BaroDevelopment/PaladinJS/7a2e84a68303f995d9aea79a71724f855483faab/docs/docs/images/branding/banner-transparent.png
--------------------------------------------------------------------------------
/docs/docs/images/branding/banner.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/BaroDevelopment/PaladinJS/7a2e84a68303f995d9aea79a71724f855483faab/docs/docs/images/branding/banner.png
--------------------------------------------------------------------------------
/docs/docs/images/branding/book-large.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/BaroDevelopment/PaladinJS/7a2e84a68303f995d9aea79a71724f855483faab/docs/docs/images/branding/book-large.png
--------------------------------------------------------------------------------
/docs/docs/images/branding/book-small.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/BaroDevelopment/PaladinJS/7a2e84a68303f995d9aea79a71724f855483faab/docs/docs/images/branding/book-small.png
--------------------------------------------------------------------------------
/docs/docs/images/branding/book.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/BaroDevelopment/PaladinJS/7a2e84a68303f995d9aea79a71724f855483faab/docs/docs/images/branding/book.png
--------------------------------------------------------------------------------
/docs/docs/images/branding/logo-alt-transparent.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/BaroDevelopment/PaladinJS/7a2e84a68303f995d9aea79a71724f855483faab/docs/docs/images/branding/logo-alt-transparent.png
--------------------------------------------------------------------------------
/docs/docs/images/branding/logo-large.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/BaroDevelopment/PaladinJS/7a2e84a68303f995d9aea79a71724f855483faab/docs/docs/images/branding/logo-large.png
--------------------------------------------------------------------------------
/docs/docs/images/branding/logo-simple.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/BaroDevelopment/PaladinJS/7a2e84a68303f995d9aea79a71724f855483faab/docs/docs/images/branding/logo-simple.png
--------------------------------------------------------------------------------
/docs/docs/images/branding/logo-small.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/BaroDevelopment/PaladinJS/7a2e84a68303f995d9aea79a71724f855483faab/docs/docs/images/branding/logo-small.png
--------------------------------------------------------------------------------
/docs/docs/images/branding/logo-transparent.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/BaroDevelopment/PaladinJS/7a2e84a68303f995d9aea79a71724f855483faab/docs/docs/images/branding/logo-transparent.png
--------------------------------------------------------------------------------
/docs/docs/images/branding/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/BaroDevelopment/PaladinJS/7a2e84a68303f995d9aea79a71724f855483faab/docs/docs/images/branding/logo.png
--------------------------------------------------------------------------------
/docs/docs/images/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/BaroDevelopment/PaladinJS/7a2e84a68303f995d9aea79a71724f855483faab/docs/docs/images/logo.png
--------------------------------------------------------------------------------
/docs/docs/images/paypal.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/BaroDevelopment/PaladinJS/7a2e84a68303f995d9aea79a71724f855483faab/docs/docs/images/paypal.png
--------------------------------------------------------------------------------
/docs/docs/information/README.md:
--------------------------------------------------------------------------------
1 | ## Information Commands
2 |
3 | Here is an overview about all available information commands
4 |
5 | >[Help Command](./help.md)
6 |
7 | >[Avatar Command](./avatar.md)
8 |
9 | >[UserInfo Command](./userinfo.md)
10 |
11 | >[ServerInfo Command](./serverinfo.md)
12 |
13 | >[RolesInfo Command](./roleinfo.md)
14 |
15 | >[ChannelInfo Command](./channelinfo.md)
16 |
17 | >[ShardInfo Command](./shardinfo.md)
18 |
19 | >[AFK Command](./afk.md)
20 |
21 | >[Ping Command](./ping.md)
22 |
23 | >[Uptime Command](./uptime.md)
24 |
25 | >[Speedtest Command](./speedtest.md)
26 |
27 | >[EmojiInfo Command](./emojiinfo.md)
--------------------------------------------------------------------------------
/docs/docs/information/afk.md:
--------------------------------------------------------------------------------
1 | # AFK Command
2 | Set your afk message
3 |
4 | ### User Permissions needed
5 | `none`
6 | ### Bot Permissions needed
7 | `none`
8 |
9 | ### Parameters
10 | `afk-message` - your afk message to be displayed
11 |
12 | ### Cooldown
13 | `10 seconds`
14 |
15 |
16 | ### Usage
17 | `-afk [afk-message]`
18 |
19 | ::: tip Hint
20 | The afk is working across all servers where the bot is in.
21 | The afk status is valid in every server Paladin is in.
22 | :::
23 |
24 | ::: warning Cool!
25 | Paladin is also displaying a timer (days, hours, minutes, seconds)!
26 | :::
27 |
28 | ### Previev
29 |
30 | 
31 |
32 | 
33 |
34 | ::: danger Multiple afk mentions
35 | If you mention multiple users then Paladin will show you which of them are afk
36 | :::
37 |
38 | 
--------------------------------------------------------------------------------
/docs/docs/information/avatar.md:
--------------------------------------------------------------------------------
1 | # Avatar Command
2 | Display a users avatar and it's link
3 |
4 | ### User Permissions needed
5 | `none`
6 | ### Bot Permissions needed
7 | `none`
8 |
9 |
10 | ### Alias:
11 | >
12 | >
13 | >
14 |
15 |
16 | ### Parameters
17 | `@user` - The user to get the avatar from
18 |
19 | `@user1 @user2 ... @user5` - You can get avatars from up to 5 users.
20 |
21 |
22 | ### Cooldown
23 | `5 seconds`
24 |
25 |
26 | ### Usage
27 | `-avatar` will display your avatar
28 |
29 | `-avatar @user` will display avatar of mention user
30 |
31 |
32 | ::: tip Hint
33 | If **no** user mentioned then bot will show only your avatar.
34 | :::
35 |
36 |
37 |
38 | ### Previev
39 |
40 | 
41 |
42 | 
--------------------------------------------------------------------------------
/docs/docs/information/botinfo.md:
--------------------------------------------------------------------------------
1 | # BotInfo Command
2 | Get an overview about Paladin Stats
3 |
4 | ### User Permissions needed
5 | `none`
6 | ### Bot Permissions needed
7 | `none`
8 |
9 | ### Alias:
10 | >
11 | >
12 | >
13 | >
14 |
15 | ### Parameters
16 | `none`
17 |
18 | ### Cooldown
19 | `60 seconds`
20 |
21 |
22 | ### Usage
23 | `-botinfo`
24 |
25 |
26 | ### Previev
27 |
28 | 
--------------------------------------------------------------------------------
/docs/docs/information/channelinfo.md:
--------------------------------------------------------------------------------
1 | # ChannelInfo Command
2 | Get an overview about a channel
3 |
4 | ### User Permissions needed
5 | `none`
6 | ### Bot Permissions needed
7 | `none`
8 |
9 | ### Alias:
10 | >
11 | >
12 |
13 |
14 | ### Parameters
15 | `#channel` - The channel as mention
16 |
17 | `channel-id` - The id of the channel
18 |
19 | `channel-name` - The name of the channel
20 |
21 |
22 | ### Cooldown
23 | `5 seconds`
24 |
25 |
26 | ### Usage
27 | `-channelinfo [#channel]`
28 |
29 | `-channelinfo [channel id]`
30 |
31 | `-channelinfo [channel-name]`
32 |
33 |
34 | ::: tip Hint
35 | You can **not** execute this command in DM's
36 | :::
37 |
38 |
39 |
40 | ### Previev
41 |
42 | 
43 |
--------------------------------------------------------------------------------
/docs/docs/information/emojiinfo.md:
--------------------------------------------------------------------------------
1 | # EmojiInfo Command
2 | Get an overview about a specific emoji
3 |
4 | ### User Permissions needed
5 | `none`
6 | ### Bot Permissions needed
7 | `none`
8 |
9 | ### Alias:
10 | >
11 | >
12 |
13 |
14 | ### Parameters
15 | `emoji-name` - The name of the emoji
16 |
17 | `emoji-id` - The id of the emoji
18 |
19 | `:emoji` - The emoji as mention
20 |
21 | ### Cooldown
22 | `5 seconds`
23 |
24 | ### Usage
25 | `-emojiinfo [:emoji:]`
26 |
27 | `-emojiinfo [emoji id]`
28 |
29 | `-emojiinfo [emoji-name]`
30 |
31 | ::: tip Hint
32 | You can **not** get the emoji info of other server emotes.
33 |
34 | The bot is searching for the emote only in the server where the command has been executed.
35 | :::
36 |
37 | ### Previev
38 |
39 | 
--------------------------------------------------------------------------------
/docs/docs/information/help.md:
--------------------------------------------------------------------------------
1 | # Help Command
2 | >List of all Paladin commands
3 | ### User Permissions needed
4 | `none`
5 | ### Bot Permissions needed
6 | `none`
7 |
8 | ### Alias:
9 | >
10 |
11 | ### Parameters
12 | `command-name` - The command to get more informations from
13 |
14 | ### Cooldown
15 | `5 seconds`
16 |
17 | ### Usage
18 | `-help`
19 |
20 | `-help [command name]`
21 |
22 | ::: tip Hint
23 | Type `-help` to get ALL available commands.
24 | If you need more information about a specific command then simply type:
25 | `-help [command name]`
26 | :::
27 |
28 | 
29 | 
30 | 
31 |
--------------------------------------------------------------------------------
/docs/docs/information/ping.md:
--------------------------------------------------------------------------------
1 | # Ping Command
2 | Get Discord websocket and rest pings
3 |
4 | ### User Permissions needed
5 | `none`
6 | ### Bot Permissions needed
7 | >
8 |
9 | ### Parameters
10 | `none`
11 |
12 | ### Cooldown
13 | `60 seconds`
14 |
15 |
16 | ### Usage
17 | `-ping`
18 |
19 | ### Previev
20 |
21 | 
--------------------------------------------------------------------------------
/docs/docs/information/roleinfo.md:
--------------------------------------------------------------------------------
1 | # RoleInfo Command
2 | Get an overview about a role
3 |
4 | ### User Permissions needed
5 | `none`
6 | ### Bot Permissions needed
7 | `none`
8 |
9 | ### Alias:
10 | >
11 | >
12 |
13 |
14 | ### Parameters
15 | `@role` - The role as mention
16 |
17 | `role-id` - The id of the role
18 |
19 | `role-name` - The name of the role
20 |
21 | ### Cooldown
22 | `5 seconds`
23 |
24 |
25 | ### Usage
26 | `-roleinfo [@role]`
27 |
28 | `-roleinfo [role id]`
29 |
30 | `-roleinfo [role-name]`
31 |
32 | ::: tip Hint
33 | You can **not** execute this command with arguments (id, name or role-mention).
34 | Also you can not execute this command in DM's
35 | :::
36 |
37 | ### Previev
38 |
39 | 
40 |
41 | 
--------------------------------------------------------------------------------
/docs/docs/information/serverinfo.md:
--------------------------------------------------------------------------------
1 | # ServerInfo Command
2 | Display full information about a discord server
3 |
4 | ### User Permissions needed
5 | `none`
6 | ### Bot Permissions needed
7 | `none`
8 |
9 | ### Alias:
10 | >
11 | >
12 |
13 |
14 | ### Parameters
15 | `server-id` - The id of the server
16 |
17 | `server-name` - The name of the server
18 |
19 | ### Cooldown
20 | `5 seconds`
21 |
22 | ### Usage
23 | `-serverinfo `
24 |
25 | `-serverinfo [user id]`
26 |
27 | `-serverinfo [user-name]`
28 |
29 | ### Previev
30 |
31 | 
--------------------------------------------------------------------------------
/docs/docs/information/shardinfo.md:
--------------------------------------------------------------------------------
1 | # ShardInfo Command
2 | Get an overview about the shards
3 |
4 | ### User Permissions needed
5 | `none`
6 | ### Bot Permissions needed
7 | `none`
8 |
9 | ### Alias:
10 | >
11 | >
12 | >
13 |
14 | ### Parameters
15 | `none`
16 |
17 | ### Cooldown
18 | `60 seconds`
19 |
20 | ### Usage
21 | `-shards`
22 |
23 | ### Previev
24 |
25 | 
--------------------------------------------------------------------------------
/docs/docs/information/speedtest.md:
--------------------------------------------------------------------------------
1 | # Speedtest Command
2 | Used to test the speed of the Bot/Host
3 |
4 | ### User Permissions needed
5 | `none`
6 |
7 | ### Bot Permissions needed
8 | `none`
9 |
10 | ### Parameters
11 | `none`
12 |
13 | ### Alias:
14 | >
15 |
16 | ### Cooldown
17 | `60 seconds`
18 |
19 |
20 | ### Usage
21 | `-speedtest`
22 |
23 | ### Previev
24 |
25 | 
--------------------------------------------------------------------------------
/docs/docs/information/uptime.md:
--------------------------------------------------------------------------------
1 | # Uptime Command
2 | Displays the time the bot has been up.
3 |
4 | ### User Permissions needed
5 | `none`
6 | ### Bot Permissions needed
7 | `none`
8 |
9 | ### Parameters
10 | `none`
11 |
12 | ### Alias:
13 | >
14 |
15 | ### Cooldown
16 | `60 seconds`
17 |
18 | ### Usage
19 | `-uptime`
20 |
21 | ::: tip Hint
22 | The uptime is also displayed in the [ServerInfo Command](https://ylngyang.github.io/PaladinJS/information/serverinfo.html)
23 | :::
24 |
25 | ### Previev
26 |
27 | 
--------------------------------------------------------------------------------
/docs/docs/information/userinfo.md:
--------------------------------------------------------------------------------
1 | # UserInfo Command
2 | Get an overview about a user
3 |
4 | ### User Permissions needed
5 | `none`
6 | ### Bot Permissions needed
7 | `none`
8 |
9 | ### Alias:
10 | >
11 | >
12 |
13 |
14 | ### Parameters
15 | `@user` - The user as mention
16 |
17 | `user-id` - The id of the user
18 |
19 | `user-name` - The name of the user
20 |
21 |
22 | ### Cooldown
23 | `5 seconds`
24 |
25 |
26 | ### Usage
27 | `-userinfo [@user]`
28 |
29 | `-userinfo [user id]`
30 |
31 | `-userinfo [user-name]`
32 |
33 |
34 | ::: tip Hint
35 | If **no** user mentioned then bot will show only your user information.
36 | :::
37 |
38 |
39 |
40 | ### Previev
41 |
42 | 
--------------------------------------------------------------------------------
/docs/docs/media/README.md:
--------------------------------------------------------------------------------
1 | ## Media Commands
2 |
3 | Here is an overview about all available media commands
4 |
5 | >[Belike Command](./belike.md)
6 |
--------------------------------------------------------------------------------
/docs/docs/media/belike.md:
--------------------------------------------------------------------------------
1 | ## Belike Command
2 | Show others your coolness and send a Be-Like-Bill Meme
3 |
4 | > Powered by [BelikeBill API](https://github.com/gautamkrishnar/Be-Like-Bill)
5 |
6 | ### User Permissions needed
7 | `none`
8 | ### Bot Permissions needed
9 | `none`
10 |
11 | ### Parameters
12 | `name` - The name to show. If not given your name will be choosen
13 |
14 | ### Cooldown
15 | `5 seconds`
16 |
17 |
18 | ### Usage
19 | `-belike [Stalitsa]`
20 |
21 | `-belike [Stalitsa] -s f` -- Gender will be female
22 |
23 | `-belike [Stalitsa] -s m` -- Gender will be male
24 |
25 | If gender is not specified then it will be random.
26 |
27 | 
28 |
--------------------------------------------------------------------------------
/docs/docs/misc/README.md:
--------------------------------------------------------------------------------
1 | ## Misc Commands
2 |
3 | Here is an overview about all available misc commands
4 |
5 | >[Json Command](./json.md)
6 |
7 | >[Embed Command](./embed.md)
8 |
--------------------------------------------------------------------------------
/docs/docs/misc/embed.md:
--------------------------------------------------------------------------------
1 | ## Embed Command
2 | Generate a beautiful and easy to create embed powered by [Embed-Visualizer](https://leovoel.github.io/embed-visualizer/)
3 |
4 | ### User Permissions needed
5 | `none`
6 | ### Bot Permissions needed
7 | `none`
8 |
9 | ### Parameters
10 | `message` - The message to display in an embed
11 |
12 | `json` - The JSON code to convert into an embed
13 |
14 | ### Cooldown
15 | `5 seconds`
16 |
17 |
18 | ### Usage
19 | `-embed [message]`
20 |
21 | >
22 |
23 | `-embed [json]` - generate the code [here](https://leovoel.github.io/embed-visualizer/)
24 |
25 | >
26 |
--------------------------------------------------------------------------------
/docs/docs/misc/json.md:
--------------------------------------------------------------------------------
1 | ## Json Command
2 | Get the json code of a MessageEmbed. Can be used for the [Embed Visualizer](https://leovoel.github.io/embed-visualizer/)
3 |
4 | ### User Permissions needed
5 | `none`
6 | ### Bot Permissions needed
7 | `none`
8 |
9 | ### Parameters
10 | `message-id` - The id of the message to get the code from
11 |
12 | `channel-id` - ID of the channel where the embed is in
13 |
14 | ::: danger Keep in mind
15 | The message must be an embed!
16 | :::
17 |
18 | ### Cooldown
19 | `30 seconds`
20 |
21 |
22 | ### Usage
23 | `-json [message-id]` - bot will search the message in the channel where the command got executed
24 |
25 | `-ban [channel-id] [message-id]`
26 |
27 | ::: tip
28 | To avoid spam the bot will post the code to [Hastebin](https://hastebin.com/) and provide the link
29 | :::
30 |
31 |
32 | ### Previev
33 |
34 | 
35 |
--------------------------------------------------------------------------------
/docs/docs/moderation/README.md:
--------------------------------------------------------------------------------
1 | ## Moderation Commands
2 |
3 | Here is an overview about all available moderation commands
4 |
5 | >[Kick Command](./kick.md)
6 |
7 | >[Ban Command](./ban.md)
8 |
9 | >[Purge Command](./purge.md)
10 |
11 | >[Channeltopic Command](./channeltopic.md)
12 |
13 | >[Emote Command](./emote.md)
14 |
--------------------------------------------------------------------------------
/docs/docs/moderation/ban.md:
--------------------------------------------------------------------------------
1 | ## Ban Command
2 | Ban a member from the server. Banned user will get a DM with reason aswell.
3 |
4 | ### User Permissions needed
5 | >
6 | ### Bot Permissions needed
7 | >
8 |
9 | ### Parameters
10 | `@user` - The user to ban
11 |
12 | `user-id` - The id of the user to ban
13 |
14 | `user-name` - The name of the user to ban
15 |
16 | ::: danger
17 | If you provide `user-name` as parameter and multiple users have the same name
18 | then bot will target the first match and you might end up banning wrong user!
19 | :::
20 |
21 | ### Cooldown
22 | `5 seconds`
23 |
24 |
25 | ### Usage
26 | `-ban [@user]`
27 |
28 | `-ban [user id]`
29 |
30 | `-ban [user-name]`
31 |
32 | ::: warning
33 | You can only ban 1 user with 1 command.
34 | :::
35 |
36 |
37 | ### Previev
38 |
39 | 
40 |
41 |
42 | #### If DM is enabled then bot will send the banned user the same notification via DM
43 |
--------------------------------------------------------------------------------
/docs/docs/moderation/channeltopic.md:
--------------------------------------------------------------------------------
1 | ## Channeltopic Command
2 | Change the topic of a channel
3 |
4 | ### User Permissions needed
5 | >
6 | ### Bot Permissions needed
7 | >
8 |
9 | ### Parameters
10 | `topic` - The channel topic to set
11 | `r` - the reason to display in audit logs
12 |
13 | ::: danger
14 | If no topic) is given then the channel topic will be cleared
15 | :::
16 |
17 | ### Examples
18 | `-channeltopic Get some help in #help or dm @Stalista#1337`
19 |
20 | `-channeltopic Welcome to this channel -r Welcoming now users via channel topic`
21 |
22 | ### Cooldown
23 | `5 seconds`
24 |
25 | ### Usage
26 | `-channeltopic [topic]`
27 |
28 | ### Previev
29 |
30 | >
31 |
--------------------------------------------------------------------------------
/docs/docs/moderation/emote.md:
--------------------------------------------------------------------------------
1 | ## Emote Command
2 | Add emotes to your server
3 |
4 | ### User Permissions needed
5 | >
6 | ### Bot Permissions needed
7 | >
8 |
9 | ### Parameters
10 | `URL` - The url of the emote
11 |
12 | ::: tip
13 | You can post your desired emote and then right click on it and copy the url
14 | :::
15 |
16 | ### Examples
17 | `-emote Kentaro https://cdn.discordapp.com/emojis/492675557264457728.png?v=1`
18 |
19 | ### Cooldown
20 | `5 seconds`
21 |
22 | ### Usage
23 | `-emote [URL]`
24 |
25 | ### Previev
26 |
27 | ::: danger Keep in mind
28 | Max Size: is 256kb
29 |
30 | Your emote should have at least 128x128 pixels and will be resized to 32x32 pixels once uploaded.
31 | :::
32 |
33 | >
34 |
--------------------------------------------------------------------------------
/docs/docs/moderation/kick.md:
--------------------------------------------------------------------------------
1 | ## Kick Command
2 | Kick a member from the server. Kicked user will get a DM with reason aswell.
3 |
4 | ### User Permissions needed
5 | >
6 | ### Bot Permissions needed
7 | >
8 |
9 | ### Parameters
10 | `@user` - The user to kick
11 |
12 | `user-id` - The id of the user to kick
13 |
14 | `user-name` - The name of the user to kick
15 |
16 | ::: danger
17 | If you provide `user-name` as parameter and multiple users have the same name
18 | then bot will target the first match and you might end up kicking wrong user!
19 | :::
20 |
21 | ### Cooldown
22 | `5 seconds`
23 |
24 |
25 | ### Usage
26 | `-kick [@user]`
27 |
28 | `-kick [user id]`
29 |
30 | `-kick [user-name]`
31 |
32 | ::: warning
33 | You can only kick 1 user with 1 command.
34 | :::
35 |
36 |
37 | ### Previev
38 |
39 | 
40 |
41 |
42 | #### If DM is enabled then bot will send the kicked user the same notification via DM
43 |
--------------------------------------------------------------------------------
/docs/docs/moderation/purge.md:
--------------------------------------------------------------------------------
1 | ## Purge Command
2 |
3 | ### User Permissions needed
4 | >
5 | ### Bot Permissions needed
6 | >
7 |
8 | ### Parameters
9 | `n` - The amount of messages you want to delete (between 1 and 99) - Default is 100
10 |
11 | ::: danger
12 | You can not delete more than 100 messages and messages posted 2 weeks ago or more.
13 | This is a Discord restriction!
14 | :::
15 |
16 | ### Cooldown
17 | `30 seconds`
18 |
19 | ### Example
20 | `-purge 42`
21 |
22 | ### Usage
23 | `-purge [n]`
24 |
25 | ### Advanced Usage
26 | ```bash
27 | -t [n] => purge messages that got pasted n ago
28 | -b => purge only messages from bots (if user mentioned this will be ignored)
29 | -p => delete also pinned messages
30 | -n => the ammount of messages you wanna delete
31 | @user => delete messages only from mentioned user
32 | ```
33 |
34 | >Example
35 |
36 | purge from last 40 messages (including pinned ones) where
37 | the author is a bot, and the message is not older than 30 min
38 |
39 | #### Those are all equivalent to each other
40 | `-purge 100 -bpt 30`
41 |
42 | `-purge -n 100 -bpt 30`
43 |
44 | `-purge -n 100 -b -p -t 30`
45 |
46 | `-purge --amount=100 --bots --pinned --time=30`
47 |
48 | Purge only messages from Stalista#7777
49 |
50 | `-purge 100 @Stalista#7777`
51 |
--------------------------------------------------------------------------------
/docs/docs/owner/README.md:
--------------------------------------------------------------------------------
1 | ## Owner Commands
2 |
3 | Here is an overview about all available information commands
4 |
5 | >[Eval Command](./eval.md)
6 |
7 | >[SSH Command](./ssh.md)
8 |
9 | >[Leave Server Command](./leaveServer.md)
10 |
11 | >[SetUsername Command](./setUsername.md)
12 |
13 | >[SetNickname Command](./setNickname.md)
14 |
15 | >[SetAvatar Command](./setAvatar.md)
16 |
17 | >[SetActivity Command](./setActivity.md)
18 |
--------------------------------------------------------------------------------
/docs/docs/owner/eval.md:
--------------------------------------------------------------------------------
1 | # Eval Command
2 | Evaluate and execute Javascript code through Discord
3 |
4 | ### User Permissions needed
5 | `BOT_OWNER`
6 | ### Bot Permissions needed
7 | `none`
8 |
9 | ### Alias:
10 | >`none`
11 |
12 | ### Parameters
13 | `[JAVASCRIPT]` - Your Javascript Code to execute
14 |
15 | ### Cooldown
16 | `1 seconds`
17 |
18 | ### Usage
19 | `-javascript [JAVASCRIPT]`
20 |
21 | ### Examples
22 |
23 | >Calculate
24 | ```js
25 | -eval 5 + 6
26 | -eval Math.pow(5, 8)
27 | ```
28 |
29 | > Display all servers the bot is in (only from 1 shard)
30 | ```js
31 | -eval message.client.guilds.map(g=>g.name).join('\n')
32 | ```
33 |
34 |
35 | > Leave server with id: 285532310466461697
36 |
37 | ```js
38 | -eval message.client.shard.broadcastEval('if(this.guilds.get(\'285532310466461697\'))this.guilds.get(\'285532310466461697\').leave()')
39 | ```
40 |
41 | ::: danger Hint
42 | Make sure only the BOT_OWNER has access to this command
43 | It can break your bot and is really really dangerous!
44 | :::
45 |
46 | ### Previev
47 | 
48 |
--------------------------------------------------------------------------------
/docs/docs/owner/exec.md:
--------------------------------------------------------------------------------
1 | ## Exec Command
2 | Execute a command line command where the bot is running on.
3 |
4 | The starting point/ base of the command is where the `index.js` file is.
5 |
6 | ::: tip
7 | This command is the same like [ssh](./ssh.md).
8 | It is executing a given command on the cli the device is running on.
9 | :::
10 |
11 | ### User Permissions needed
12 | `BOT_OWNER`
13 |
14 | ### Bot Permissions needed
15 | `none`
16 |
17 | ### Parameters
18 | `[command]` - Your command line code to execute
19 |
20 | ### Cooldown
21 | `1 second`
22 |
23 | ### Usage
24 | `-exec [command]`
25 |
26 | ### Examples
27 | Check out [ssh](./ssh.md) for some examples
28 |
--------------------------------------------------------------------------------
/docs/docs/owner/leaveServer.md:
--------------------------------------------------------------------------------
1 | # LeaveServer Command
2 | Let the bot leave a Server
3 |
4 | ### User Permissions needed
5 | `BOT_OWNER`
6 |
7 | ### Bot Permissions needed
8 | `none`
9 |
10 | ### Usage
11 | `-leaveServer [server_id]`
12 |
13 | ### Parameters
14 | `[server_id]` - The id of the server to leave
15 |
16 | ### Cooldown
17 | `1 second`
--------------------------------------------------------------------------------
/docs/docs/owner/setActivity.md:
--------------------------------------------------------------------------------
1 | # SetActivity Command
2 | Change Paladin's activity
3 |
4 | ### User Permissions needed
5 | `BOT_OWNER`
6 |
7 | ### Bot Permissions needed
8 | `none`
9 |
10 | ### Usage
11 | `-setActivity [activity]`
12 |
13 | **How to pass activity type:**
14 |
15 | `-setActivity [activity] -t [type]`
16 |
17 | Available types:
18 | - PLAYING **(default)**
19 | - STREAMING
20 | - LISTENING
21 | - WATCHING
22 |
23 | ### Example
24 | `-setActivity i am borred -t WATCHING`
25 |
26 | `-setActivity check me out -t STREAMING -u https://www.twitch.tv/misselion`
27 |
28 | ### Parameters
29 | `[activity]` - The message to display
30 |
31 | ### Cooldown
32 | `1 second`
33 |
34 | ### Previev
35 |
36 | 
37 |
38 | 
39 |
--------------------------------------------------------------------------------
/docs/docs/owner/setAvatar.md:
--------------------------------------------------------------------------------
1 | # SetAvatar Command
2 | Change Paladin's avatar
3 |
4 | ### User Permissions needed
5 | `BOT_OWNER`
6 |
7 | ### Bot Permissions needed
8 | `none`
9 |
10 | ### Usage
11 | `-setAvatar [avatar_url]`
12 |
13 | ### Parameters
14 | `[avatar_url]` - The url of your avatar
15 |
16 | ### Cooldown
17 | `1 second`
18 |
19 | ::: danger Hint
20 | Make sure you pass a valid image url as an argument!
21 | :::
22 |
--------------------------------------------------------------------------------
/docs/docs/owner/setNickname.md:
--------------------------------------------------------------------------------
1 | # SetNickname Command
2 | Change Paladin's nickname
3 |
4 | ### User Permissions needed
5 | `BOT_OWNER`
6 |
7 | ### Bot Permissions needed
8 | `none`
9 |
10 | ### Usage
11 | `-setNickname [name]`
12 |
13 | ### Parameters
14 | `[name]` - The message to display
15 |
16 | `[reason]` - Reason to show in Audit-Logs **(optional)**
17 |
18 | ### Example
19 | `-setNickname MalakaSlayer -r Yo don't need to know :P`
20 |
21 | ### Cooldown
22 | `1 second`
23 |
--------------------------------------------------------------------------------
/docs/docs/owner/setUsername.md:
--------------------------------------------------------------------------------
1 | # SetUsername Command
2 | Change Paladin's username
3 |
4 | ### User Permissions needed
5 | `BOT_OWNER`
6 |
7 | ### Bot Permissions needed
8 | `none`
9 |
10 | ### Usage
11 | `-setUsername [name]`
12 |
13 | ### Parameters
14 | `[name]` - Paladin's new username
15 |
16 | ### Cooldown
17 | `1 second`
18 |
--------------------------------------------------------------------------------
/docs/docs/owner/ssh.md:
--------------------------------------------------------------------------------
1 | ## SSH Command
2 | Execute command line commands on connected device using SSH.
3 | Mainly used to execute scripts like start, restart and update
4 |
5 | The starting point/ base of the command is `/root/`.
6 |
7 | ::: tip
8 | This command is the same like [exec](./exec.md).
9 | It is executing a given command on the cli the device is connected to via ssh.
10 | :::
11 |
12 | ### User Permissions needed
13 | `BOT_OWNER`
14 |
15 | ### Bot Permissions needed
16 | `none`
17 |
18 | ### Parameters
19 | `[command]` - Your command line code to execute
20 |
21 | ### Cooldown
22 | `1 second`
23 |
24 | ### Usage
25 | `-ssh [command]`
26 |
27 | ## Examples
28 |
29 | ```bash
30 | -ssh sudo apt-get update => Update Linux host
31 | -ssh ls => check content in /root
32 | -ssh cd PaladinJS && ls => check content in PaladinJS folder
33 | -ssh sh start.sh => start Paladin
34 | -ssh sh restart.sh => restart Paladin
35 | -ssh sh update.sh => Update Paladin
36 | -ssh cd PaladinJS && sh start.sh => start PaladinJS
37 | -ssh cd PaladinJS && sh stop.sh => shutdown PaladinJS
38 | -ssh cd PaladinJS && sh restart.sh => restart PaladinJS
39 | -ssh cd PaladinJS && sh update.sh => Update PaladinJS
40 | -ssh sh restart.sh && cd PaladinJS && sh update.sh => restart Paladin and update PaladinJS
41 | ```
42 |
43 | ::: tip How to stop the bot
44 | ```bash
45 | -ssh tmux kill-session -t Paladin => Shutdown Paladin
46 | -ssh tmux kill-session -t PaladinJS => Shutdown Paladin
47 | ```
48 | :::
49 |
50 | ## Handling Script with Tmux (Paladin)
51 |
52 | > Paladin start script
53 | ```bash
54 | tmux new -d -s Paladin 'cd /root/Paladin/build/libs/ && java -jar Paladin-1.0-all.jar'
55 | ```
56 |
57 | > Paladin restart script
58 | ```bash
59 | cd /root/Paladin/ && tmux kill-session -t Paladin && tmux new -d -s Paladin 'cd build/libs/ && java -jar Paladin-1.0-all.jar'
60 | ```
61 |
62 | > Paladin update script
63 | ```bash
64 | cd /root/Paladin/ && git pull && tmux kill-session -t Paladin && tmux new -d -s Paladin 'cd build/libs/ && java -jar Paladin-1.0-all.jar'
65 | ```
66 |
67 | For more informations about Tmux click [HERE](https://gist.github.com/MohamedAlaa/2961058)
68 |
69 | ## Handling Script with PM2 (PaladinJS)
70 | > PaladinJS start script
71 | ```bash
72 | cd /root/PaladinJS/app && pm2 start index.js --name PaladinJS --watch
73 | ```
74 |
75 | > PaladinJS restart script
76 | ```bash
77 | pm2 restart PaladinJS
78 | ```
79 |
80 | > PaladinJS update script
81 | ```bash
82 | git pull && pm2 restart PaladinJS
83 | ```
84 |
85 | > PaladinJS stop script
86 | ```bash
87 | pm2 delete PaladinJS
88 | ```
89 |
90 | For more informations about PM2 click [here](https://pm2.keymetrics.io/)
--------------------------------------------------------------------------------
/docs/docs/search/README.md:
--------------------------------------------------------------------------------
1 | ## Search Commands
2 |
3 | Here is an overview about all kind of search commands
4 |
5 | >[Google Command](./google.md)
6 |
7 | >[LMGTFY Command](./lmgtfy.md)
8 |
9 | >[Urban Command](./urban.md)
10 |
11 | >[Dictionary Command](./dictionary.md)
12 |
--------------------------------------------------------------------------------
/docs/docs/search/dictionary.md:
--------------------------------------------------------------------------------
1 | # Dictionary Command
2 | A oxford dictionary lookup to get the definition of a word
3 |
4 | ### User Permissions needed
5 | `none`
6 | ### Bot Permissions needed
7 | `none`
8 |
9 | ### Alias:
10 | >
11 | >
12 |
13 | ### Parameters
14 | `search-term` - Your query string
15 |
16 | ### Cooldown
17 | `10 seconds`
18 |
19 | ### Usage
20 | `-define [search-term]`
21 |
22 | 
23 |
--------------------------------------------------------------------------------
/docs/docs/search/google.md:
--------------------------------------------------------------------------------
1 | ## Google Command
2 | Get an overview about Paladin Stats
3 |
4 | ### User Permissions needed
5 | `none`
6 | ### Bot Permissions needed
7 | `none`
8 |
9 | ### Alias:
10 |
11 |
12 | ### Parameters
13 | `search-term` - Your query string
14 |
15 | ### Cooldown
16 | `5 seconds`
17 |
18 |
19 | ### Usage
20 | `-google [search-term]`
21 |
22 |
23 | ### Previev
24 |
25 | 
--------------------------------------------------------------------------------
/docs/docs/search/lmgtfy.md:
--------------------------------------------------------------------------------
1 | # LMGTFY Command
2 | Act like a smartass and provide a [googleitfor.me](https://googleitfor.me) link with your search query.
3 |
4 | ### User Permissions needed
5 | `none`
6 | ### Bot Permissions needed
7 | `none`
8 |
9 | ### Alias:
10 |
11 |
12 |
13 | ### Parameters
14 | `search-term` - Your query string
15 |
16 | ### Cooldown
17 | `5 seconds`
18 |
19 |
20 | ### Usage
21 | `-lmgtfy [search-term]`
22 |
23 |
24 | ### Previev
25 |
26 | 
--------------------------------------------------------------------------------
/docs/docs/search/urban.md:
--------------------------------------------------------------------------------
1 | # Urban Command
2 | Query the Urban Dictionary API
3 |
4 | ::: danger
5 | This command is only executable in NSFW flagged channels!
6 | :::
7 |
8 | 
9 |
10 | ### User Permissions needed
11 | `none`
12 | ### Bot Permissions needed
13 | `none`
14 |
15 | ### Alias:
16 | >
17 |
18 | ### Parameters
19 | `search-term` - Your query string
20 |
21 | ### Cooldown
22 | `10 seconds`
23 |
24 | ### Usage
25 | `-urban [search-term]`
26 |
27 | ::: tip Hint
28 | This command will only work in `nsfw` flagged channels
29 | :::
30 |
31 | 
32 |
--------------------------------------------------------------------------------
/docs/docs/usage/README.md:
--------------------------------------------------------------------------------
1 | ## Overview
2 |
3 | >[How to use Markdown](./markdown.md)
4 |
5 | >[How to use LaTeX](latex.md)
6 |
7 | >[Vuepress](vuepress.md)
8 |
9 | >[Monitoring Tools](./monitoring.md)
10 |
11 | >[DiscordJS](discordjs/discordjs.md)
12 |
--------------------------------------------------------------------------------
/docs/docs/usage/discordjs/README.md:
--------------------------------------------------------------------------------
1 | ## DiscordJS Utils
2 |
3 | ### Update all dependencies/package.json
4 | cd to the folder where the `package.json` is and then execute:
5 | ```sh
6 | npm i -g npm-check-updates
7 | ncu -u
8 | npm install
9 | ```
10 |
11 | ### fetch more than 100 messages
12 | ```js
13 | const limit = args.amount && args.amount < 100 ? args.amount : 100;
14 | let messages = await message.channel.messages.fetch({
15 | limit: 100,
16 | });
17 | let messages_2 = await message.channel.messages.fetch({ limit: 4, before: messages.last().id });
18 |
19 | let mergedMessages = messages.concat(messages_2)
20 | ```
21 |
22 | ### Get random reacted user
23 | ```js
24 | const msg = await message.channel.messages.fetch(args.msgID);
25 | const fetchedUsers = await msg.reactions.first().users.fetch([100]);
26 | const users = fetchedUsers.map(u => u.username.toString());
27 | const embed = new Discord.MessageEmbed().setDescription(users[[Math.floor(Math.random() * users.length)]]);
28 | message.channel.send(embed);
29 | ```
30 |
31 | ### Collector
32 | ```js
33 | let confirmation = await message.channel.send({
34 | embed: {
35 | description: 'Are you sure you want to shut me down?'
36 | }
37 | });
38 |
39 | const collector = confirmation.channel.createMessageCollector(m => client.credentials.ownerId.includes(m.author.id) && (m.content.toLowerCase().startsWith('yes') || m.content.toLowerCase().startsWith('no')),
40 | {
41 | time: 30 * 1000,
42 | maxMatches: 1
43 | }
44 | );
45 |
46 | collector.on('collect', async answer => {
47 | if (answer.content.toLowerCase().startsWith('yes')) {
48 | await message.channel.send({
49 | embed: {
50 | description: 'GoodBye :wave:! See you soon.'
51 | }
52 | });
53 |
54 | await client.shard.broadcastEval('this.destroy().then(() => process.exitCode = 0)');
55 | ```
56 |
--------------------------------------------------------------------------------
/docs/docs/usage/latex.md:
--------------------------------------------------------------------------------
1 | ---
2 | sidebarDepth: 0
3 | mathjax:
4 | showError: true
5 | packages: []
6 | ---
7 |
8 | ## MathJAX - $\LaTeX$
9 |
10 | ### Links
11 | - [Docs](https://vuepress.github.io/en/plugins/mathjax/)
12 | - [MathJax: LaTeX Basic Tutorial und Referenz (German)](https://www.mathelounge.de/509545/mathjax-latex-basic-tutorial-und-referenz-deutsch)
13 | - [Basics of typesetting in MathJax](https://quantumcomputing.meta.stackexchange.com/questions/49/tutorial-how-to-use-tex-mathjax/76#76)
14 |
15 | ### Inline Rendering
16 | ```
17 | Surround your LaTeX with a single `$` on each side for inline rendering.
18 | ```
19 |
20 | Input:
21 | >Euler's identity `$e^{i\pi}+1=0$` is a beautiful formula in `$\R^2$`
22 |
23 | Output:
24 | >$Euler's identity $e^{i\pi}+1=0$ is a beautiful formula in $\R^2$
25 |
26 | ### Block Rendering
27 | ```
28 | Use two `$$` for block rendering. This mode uses bigger symbols and centers the result.
29 | ```
30 |
31 | Input:
32 | >`$$\frac {\partial^r} {\partial \omega^r} \left(\frac {y^{\omega}} {\omega}\right)
33 | = \left(\frac {y^{\omega}} {\omega}\right) \left\{(\log y)^r + \sum_{i=1}^r \frac {(-1)^i r \cdots (r-i+1) (\log y)^{r-i}} {\omega^i} \right\}$$`
34 |
35 | Output:
36 | >$$\frac {\partial^r} {\partial \omega^r} \left(\frac {y^{\omega}} {\omega}\right)
37 | = \left(\frac {y^{\omega}} {\omega}\right) \left\{(\log y)^r + \sum_{i=1}^r \frac {(-1)^i r \cdots (r-i+1) (\log y)^{r-i}} {\omega^i} \right\}$$
38 |
39 | ### Using Macros
40 | This is part of `config.js` of this project:
41 | ```js
42 | module.exports = {
43 | plugins: {
44 | mathjax: {
45 | macros: {
46 | '\\Z': '\\mathbb{Z}'
47 | }
48 | }
49 | }
50 | }
51 | ```
52 | now we can write `$\Z$` instead of `$\mathbb{Z}$` to print $\Z$
53 |
54 | ### Greek letters
55 | `$\alpha$` - $\alpha$
56 | `$\beta$` - $\beta$
57 | `$\omega$` - $\omega$
58 |
59 | `$\Gamma` - $\Gamma$
60 | `$\Delta` - $Delta$
61 | `$\Omega$` - $\Omega$
62 |
63 | ### Superscript and Subscript
64 | use `^` for *superscript* and `_` for subscript
65 | >`x_i^2` $x_i^2$
66 | >`\log_2 x` $\log_2 x$
67 |
68 | ### Groups
69 | >Superscripts, subscripts, and other operations apply only to the next “group”.
70 | A “group” is either a single symbol, or any formula surrounded by curly braces {…}.
71 | If you do 10^10, you will get a surprise: $10^10$. But 10^{10} gives what you probably wanted: $10^{10}$.
72 | Use curly braces to delimit a formula to which a superscript or subscript applies: x^5^6 is an error;
73 | {x^y}^z is ${x^y}^z$, and x^{y^z} is $x^{y^z}$. Observe the difference between x_i^2 $x_i^2$ and x_{i^2} $x_{i^2}$.
74 | ### Parentheses
75 | Ordinary symbols `()[]` make parentheses and brackets $(2+3)[4+4]$. Use `\{` and `\}` for curly braces $\{\}$
76 | ### Sums and integrals
77 |
78 |
79 | ### Fractions
80 |
81 | ### Fonts
82 |
83 | ### Radical signs
84 |
85 | ### special functions
86 |
87 | ### special symbols and notations
88 |
89 | ### Spaces
90 |
91 | ### Accents and diacritical marks
92 |
--------------------------------------------------------------------------------
/docs/docs/usage/monitoring.md:
--------------------------------------------------------------------------------
1 | ## Netdata
2 | 
3 | ### Installation (Linux)
4 | ```sh
5 | bash <(curl -Ss https://my-netdata.io/kickstart.sh)
6 | ```
7 | (do not `sudo` this command, it will do it by itself as needed)
8 |
9 | ### Getting Started
10 | To access the netdata dashboard, navigate with your browser to:
11 | >http://your.server.ip:19999/
12 |
13 | ### Starting and stopping Netdata
14 | Netdata installer integrates Netdata to your init / systemd environment.
15 | To start/stop Netdata, depending on your environment, you should use:
16 | ```sh
17 | systemctl start netdata and systemctl stop netdata
18 | service netdata start and service netdata stop
19 | /etc/init.d/netdata start and /etc/init.d/netdata stop
20 | ```
21 | ### Monitoring MySQL/ PostgresSQL
22 | run
23 | ```sh
24 | sudo /etc/netdata/edit-config python.d/nginx.conf
25 | ```
26 | and check if python.d enabled - if not then enable it
27 | ```sh
28 | # Enable / disable the whole python.d.plugin (all its modules)
29 | enabled: yes
30 |
31 | # ----------------------------------------------------------------------
32 | # Enable / Disable python.d.plugin modules
33 | default_run: yes
34 | ```
35 | restart netdata using
36 | ```sh
37 | systemctl restart netdata
38 | ```
39 |
40 | For postgres you have to run
41 | ```sh
42 | sudo apt-get install python-psycopg2
43 | ```
44 |
45 | For MySQL you have to install the python library MySQLdb
46 | ```sh
47 | sudo apt-get install python-pip python-dev libmysqlclient-dev
48 | pip install mysqlclient
49 | ```
50 |
51 | now run
52 | ```sh
53 | ln -s /usr/bin/python /usr/libexec/netdata/plugins.d/python
54 | ```
55 |
56 | and enable the plugins in `/etc/netdata/netdata.conf`
57 | it should look like this:
58 | ```
59 | [plugins]
60 | # PATH environment variable = /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/sbin:/usr/sbin:/usr/local/bin:/usr/local/sbin
61 | PYTHONPATH environment variable = /usr/libexec/netdata/plugins.d:/usr/bin:/sbin:/usr/local/bin:/usr/local/sbin
62 | proc = yes
63 | diskspace = yes
64 | cgroups = yes
65 | tc = yes
66 | idlejitter = yes
67 | enable running new plugins = yes
68 | check for new plugins every = 60
69 | apps = yes
70 | fping = yes
71 | go.d = yes
72 | charts.d = yes
73 | node.d = yes
74 | python.d = yes
75 | ```
76 |
77 | create `mysql.conf` and/or `postgres.conf` in `/etc/netdata/python.d/`
78 |
79 | and paste + edit this lines
80 | >mysql.conf
81 |
82 | ```yaml
83 | update_every : 10
84 | priority : 90100
85 |
86 | MYSQL:
87 | user : 'DB_USER_NAME'
88 | pass : 'DB_PASSWORD'
89 | socket : '/var/run/mysqld/mysqld.sock'
90 | update_every : 1
91 | ```
92 |
93 | >postgres.conf
94 | ```yaml
95 | update_every: 30
96 |
97 | tcp:
98 | name : 'Postgres'
99 | database : 'DB_NAME'
100 | user : 'postgres'
101 | host : 'localhost'
102 | password : 'DB_USER_PASSWORD'
103 | port : 5432
104 | ```
105 |
106 | Finally restart netdata
107 | ```sh
108 | systemctl restart netdata
109 | ```
110 | and open `http://your.server.ip:19999`
111 |
112 | It might take a few second for netdata to detect the new plugins
113 | In case you can not see it simply press F5.
114 |
115 | You should be able to see your newly added plugins on the right sidebar!
116 |
117 | ### Discord Notifications
118 | - Go to `/etc/netdata/` and open `health_alarm_notify.conf`
119 | - Search for `SEND_DISCORD="YES"`
120 | - paste and edit this lines
121 | ```
122 | #------------------------------------------------------------------------------
123 | # discord (discordapp.com) global notification options
124 |
125 | # multiple recipients can be given like this:
126 | # "CHANNEL1 CHANNEL2 ..."
127 |
128 | # enable/disable sending discord notifications
129 | SEND_DISCORD="YES"
130 |
131 | # Create a webhook by following the official documentation -
132 | # https://support.discordapp.com/hc/en-us/articles/228383668-Intro-to-Webhooks
133 | DISCORD_WEBHOOK_URL="YOUR_WEBHOOK_URL_HERE"
134 |
135 | # if a role's recipients are not configured, a notification will be send to
136 | # this discord channel (empty = do not send a notification for unconfigured
137 | # roles):
138 | DEFAULT_RECIPIENT_DISCORD="alarms"
139 |
140 |
141 | #------------------------------------------------------------------------------
142 | ```
143 |
144 | don't forget to save and restart netdata!
145 |
146 | ### Uninstall netdata
147 | ```sh
148 | cd /usr/src/netdata.git./netdata-uninstaller.sh --force
149 | ```
150 |
151 | ### Resources
152 | - [Netdata Github](https://github.com/netdata/netdata)
153 | - [Netdata Docs](https://docs.netdata.cloud/)
154 | - [Discord Webhook](https://docs.netdata.cloud/health/notifications/discord/)
155 |
156 | ## Other tools
157 |
158 | - [Grafana](https://grafana.com/)
159 |
--------------------------------------------------------------------------------
/docs/docs/usage/vuepress.md:
--------------------------------------------------------------------------------
1 | ## Vuepress
2 |
3 | ### Installation
4 |
5 | #### Global Installation
6 | ```sh
7 | # install globally
8 | yarn global add vuepress # OR npm install -g vuepress
9 |
10 | # create a markdown file
11 | echo '# Hello VuePress' > README.md
12 |
13 | # start writing
14 | vuepress dev
15 |
16 | # build
17 | vuepress build
18 | ```
19 | #### Inside an Existing Project
20 | ```sh
21 | # install as a local dependency
22 | yarn add -D vuepress # OR npm install -D vuepress
23 |
24 | # create a docs directory
25 | mkdir docs
26 | # create a markdown file
27 | echo '# Hello VuePress' > docs/README.md
28 | ```
29 | ::: danger Warning
30 | It is currently recommended to use [Yarn](https://yarnpkg.com/en/) instead of npm when installing VuePress into an existing project
31 | that has webpack 3.x as a dependency. Npm fails to generate the correct dependency tree in this case.
32 | :::
33 |
34 | Then, add some scripts to `package.json`:
35 | ```json
36 | {
37 | "scripts": {
38 | "docs:dev": "vuepress dev docs",
39 | "docs:build": "vuepress build docs"
40 | }
41 | }
42 | ```
43 |
44 | You can now start writing with:
45 | ```sh
46 | yarn docs:dev # OR npm run docs:dev
47 | ```
48 | To generate static assets, run:
49 | ```sh
50 | yarn docs:build # Or npm run docs:build
51 | ```
52 | By default the built files will be in `.vuepress/dist`, which can be configured via the dest field in `.vuepress/config.js`.
53 | The built files can be deployed to any static file server.
54 | See [Deployment Guide](https://v1.vuepress.vuejs.org/guide/deploy.html) for guides on deploying to popular services.
55 |
56 | ### Resources
57 | - [Vuepress Github](https://github.com/vuejs/vuepress)
58 | - [Vuepress 1.x Docs](https://v1.vuepress.vuejs.org/)
59 | - [Vuepress 0.x Docs](https://vuepress.vuejs.org/)
60 | - [Discord.js Guide ](https://discordjs.guide/)
61 | - [Vuepress-theme-yuu](https://github.com/Danktuary/vuepress-theme-yuu)
62 | - [Vue Discord Message](https://github.com/Danktuary/vue-discord-message)
63 |
--------------------------------------------------------------------------------
/docs/docs/util/README.md:
--------------------------------------------------------------------------------
1 | ## Overview
2 |
3 | >[How to use Markdown](./markdown.md)
4 |
5 | >[How to use LaTeX](latex.md)
6 |
7 | >[Vuepress](vuepress.md)
8 |
9 | >[Monitoring Tools](./monitoring.md)
10 |
11 | >[DiscordJS](./discordjs.md)
12 |
--------------------------------------------------------------------------------
/docs/docs/util/discordjs.md:
--------------------------------------------------------------------------------
1 | ## DiscordJS Utils
2 |
3 | ### Update all dependencies/package.json
4 | cd to the folder where the `package.json` is and then execute:
5 | ```sh
6 | npm i -g npm-check-updates
7 | ncu -u
8 | npm install
9 | ```
10 |
11 | ### fetch more than 100 messages
12 | ```js
13 | const limit = args.amount && args.amount < 100 ? args.amount : 100;
14 | let messages = await message.channel.messages.fetch({
15 | limit: 100,
16 | });
17 | let messages_2 = await message.channel.messages.fetch({ limit: 4, before: messages.last().id });
18 |
19 | let mergedMessages = messages.concat(messages_2)
20 | ```
21 |
22 | ### Collector
23 | ```js
24 | let confirmation = await message.channel.send({
25 | embed: {
26 | description: 'Are you sure you want to shut me down?'
27 | }
28 | });
29 |
30 | const collector = confirmation.channel.createMessageCollector(m => client.credentials.ownerId.includes(m.author.id) && (m.content.toLowerCase().startsWith('yes') || m.content.toLowerCase().startsWith('no')),
31 | {
32 | time: 30 * 1000,
33 | maxMatches: 1
34 | }
35 | );
36 |
37 | collector.on('collect', async answer => {
38 | if (answer.content.toLowerCase().startsWith('yes')) {
39 | await message.channel.send({
40 | embed: {
41 | description: 'GoodBye :wave:! See you soon.'
42 | }
43 | });
44 |
45 | await client.shard.broadcastEval('this.destroy().then(() => process.exitCode = 0)');
46 | ```
47 |
--------------------------------------------------------------------------------
/docs/docs/util/latex.md:
--------------------------------------------------------------------------------
1 | ---
2 | sidebarDepth: 0
3 | mathjax:
4 | showError: true
5 | packages: []
6 | ---
7 |
8 | ## MathJAX - $\LaTeX$
9 |
10 | ### Links
11 | [Docs](https://vuepress.github.io/en/plugins/mathjax/)
12 |
13 | [MathJax: LaTeX Basic Tutorial und Referenz (German)](https://www.mathelounge.de/509545/mathjax-latex-basic-tutorial-und-referenz-deutsch)
14 |
15 | [Basics of typesetting in MathJax](https://quantumcomputing.meta.stackexchange.com/questions/49/tutorial-how-to-use-tex-mathjax/76#76)
16 |
17 | ### Inline Rendering
18 | ```
19 | Surround your LaTeX with a single `$` on each side for inline rendering.
20 | ```
21 |
22 | Input:
23 | >Euler's identity `$e^{i\pi}+1=0$` is a beautiful formula in `$\R^2$`
24 |
25 | Output:
26 | >$Euler's identity $e^{i\pi}+1=0$ is a beautiful formula in $\R^2$
27 |
28 | ### Block Rendering
29 | ```
30 | Use two `$$` for block rendering. This mode uses bigger symbols and centers the result.
31 | ```
32 |
33 | Input:
34 | >`$$\frac {\partial^r} {\partial \omega^r} \left(\frac {y^{\omega}} {\omega}\right)
35 | = \left(\frac {y^{\omega}} {\omega}\right) \left\{(\log y)^r + \sum_{i=1}^r \frac {(-1)^i r \cdots (r-i+1) (\log y)^{r-i}} {\omega^i} \right\}$$`
36 |
37 | Output:
38 | >$$\frac {\partial^r} {\partial \omega^r} \left(\frac {y^{\omega}} {\omega}\right)
39 | = \left(\frac {y^{\omega}} {\omega}\right) \left\{(\log y)^r + \sum_{i=1}^r \frac {(-1)^i r \cdots (r-i+1) (\log y)^{r-i}} {\omega^i} \right\}$$
40 |
41 | ### Using Macros
42 | This is part of `config.js` of this project:
43 | ```js
44 | module.exports = {
45 | plugins: {
46 | mathjax: {
47 | macros: {
48 | '\\Z': '\\mathbb{Z}'
49 | }
50 | }
51 | }
52 | }
53 | ```
54 | now we can write `$\Z$` instead of `$\mathbb{Z}$` to print $\Z$
55 |
56 | ### Greek letters
57 | `$\alpha$` - $\alpha$
58 | `$\beta$` - $\beta$
59 | `$\omega$` - $\omega$
60 |
61 | `$\Gamma` - $\Gamma$
62 | `$\Delta` - $Delta$
63 | `$\Omega$` - $\Omega$
64 |
65 | ### Superscript and Subscript
66 | use `^` for *superscript* and `_` for subscript
67 | >`x_i^2` $x_i^2$
68 | >`\log_2 x` $\log_2 x$
69 |
70 | ### Groups
71 | >Superscripts, subscripts, and other operations apply only to the next “group”.
72 | A “group” is either a single symbol, or any formula surrounded by curly braces {…}.
73 | If you do 10^10, you will get a surprise: $10^10$. But 10^{10} gives what you probably wanted: $10^{10}$.
74 | Use curly braces to delimit a formula to which a superscript or subscript applies: x^5^6 is an error;
75 | {x^y}^z is ${x^y}^z$, and x^{y^z} is $x^{y^z}$. Observe the difference between x_i^2 $x_i^2$ and x_{i^2} $x_{i^2}$.
76 | ### Parentheses
77 | Ordinary symbols `()[]` make parentheses and brackets $(2+3)[4+4]$. Use `\{` and `\}` for curly braces $\{\}$
78 | ### Sums and integrals
79 |
80 |
81 | ### Fractions
82 |
83 | ### Fonts
84 |
85 | ### Radical signs
86 |
87 | ### special functions
88 |
89 | ### special symbols and notations
90 |
91 | ### Spaces
92 |
93 | ### Accents and diacritical marks
94 |
--------------------------------------------------------------------------------
/docs/docs/util/vuepress.md:
--------------------------------------------------------------------------------
1 | ## Vuepress
2 |
3 | ### Installation
4 |
5 | #### Global Installation
6 | ```sh
7 | # install globally
8 | yarn global add vuepress # OR npm install -g vuepress
9 |
10 | # create a markdown file
11 | echo '# Hello VuePress' > README.md
12 |
13 | # start writing
14 | vuepress dev
15 |
16 | # build
17 | vuepress build
18 | ```
19 | #### Inside an Existing Project
20 | ```sh
21 | # install as a local dependency
22 | yarn add -D vuepress # OR npm install -D vuepress
23 |
24 | # create a docs directory
25 | mkdir docs
26 | # create a markdown file
27 | echo '# Hello VuePress' > docs/README.md
28 | ```
29 | ::: danger Warning
30 | It is currently recommended to use [Yarn](https://yarnpkg.com/en/) instead of npm when installing VuePress into an existing project
31 | that has webpack 3.x as a dependency. Npm fails to generate the correct dependency tree in this case.
32 | :::
33 |
34 | Then, add some scripts to `package.json`:
35 | ```json
36 | {
37 | "scripts": {
38 | "docs:dev": "vuepress dev docs",
39 | "docs:build": "vuepress build docs"
40 | }
41 | }
42 | ```
43 |
44 | You can now start writing with:
45 | ```sh
46 | yarn docs:dev # OR npm run docs:dev
47 | ```
48 | To generate static assets, run:
49 | ```sh
50 | yarn docs:build # Or npm run docs:build
51 | ```
52 | By default the built files will be in `.vuepress/dist`, which can be configured via the dest field in `.vuepress/config.js`.
53 | The built files can be deployed to any static file server.
54 | See [Deployment Guide](https://v1.vuepress.vuejs.org/guide/deploy.html) for guides on deploying to popular services.
55 |
56 | ### Resources
57 | - [Vuepress Github](https://github.com/vuejs/vuepress)
58 | - [Vuepress 1.x Docs](https://v1.vuepress.vuejs.org/)
59 | - [Vuepress 0.x Docs](https://vuepress.vuejs.org/)
60 | - [Discord.js Guide ](https://discordjs.guide/)
61 | - [Vuepress-theme-yuu](https://github.com/Danktuary/vuepress-theme-yuu)
62 | - [Vue Discord Message](https://github.com/Danktuary/vue-discord-message)
63 |
--------------------------------------------------------------------------------
/docs/docs/welcome.md:
--------------------------------------------------------------------------------
1 | ## Welcome
2 | Welcome to the official Paladin Documentation
3 | ::: tip
4 | Please keep in mind that you won't be able to do here any configuration.
5 | This is the documentation for Paladin Bot and is currently very incomplete and a work in progress.
6 | If you don't find the information you're looking for, we recommend you to join the support server.
7 | :::
8 |
9 |
10 |
11 |
12 | ## Donations
13 | Paladin is totally free and everyone can use it without restrictions.
14 | Since I have to pay the host for it and also invest a lot of time in the development I would appreciate every single donation.
15 | You can donate form [here](https://donatebot.io/checkout/393207704211947521) using PayPal.
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 | ## Paladin Command Categories
24 |
25 | >[Information Command](./information/README.md)
26 |
27 | >[Moderation Command](./moderation/README.md)
28 |
29 | >[Search Command](./search/README.md)
30 |
31 | >[Misc Command](./misc/README.md)
32 |
33 | >[Media Command](./media/README.md)
34 |
35 | >[Bot Owner Command](./owner/README.md)
36 |
37 |
38 |
39 |
40 |
41 |
42 |
--------------------------------------------------------------------------------
/docs/enhanceApp.js:
--------------------------------------------------------------------------------
1 | import Vuetify from 'vuetify';
2 | import 'vuetify/dist/vuetify.min.css'
3 |
4 | export default ({Vue, options, router, siteData,}) => {
5 | Vue.use(Vuetify);
6 | }
--------------------------------------------------------------------------------
/docs/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "vuepress-theme",
3 | "homepage": ".",
4 | "version": "1.0.0",
5 | "main": "index.js",
6 | "scripts": {
7 | "docs:dev": "vuepress dev docs",
8 | "docs:build": "vuepress build docs"
9 | },
10 | "license": "MIT",
11 | "devDependencies": {
12 | "@vuepress/plugin-back-to-top": "^1.0.0-rc.1",
13 | "@vuepress/plugin-medium-zoom": "^1.0.0-rc.1",
14 | "@vuepress/plugin-nprogress": "^1.0.0-rc.1",
15 | "css-loader": "^2.1.1",
16 | "vuepress": "^1.0.1",
17 | "vuepress-plugin-mathjax": "^1.2.4"
18 | },
19 | "dependencies": {
20 | "semver": "^6.1.1",
21 | "vue-tabs-component": "^1.5.0",
22 | "vuepress-plugin-tabs": "^0.2.2",
23 | "vuetify": "^1.5.16"
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/restart.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 | pm2 restart PaladinJS
--------------------------------------------------------------------------------
/start.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 | cd /root/PaladinJS/app && pm2 start index.js --name PaladinJS --watch
--------------------------------------------------------------------------------
/stop.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 | pm2 delete PaladinJS
--------------------------------------------------------------------------------
/update.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 | git pull && pm2 restart PaladinJS
--------------------------------------------------------------------------------