Showing preview only (732K chars total). Download the full file or copy to clipboard to get everything.
Repository: AdityaTD/PenguBot
Branch: master
Commit: be75addea7b2
Files: 240
Total size: 670.3 KB
Directory structure:
gitextract_nufrysfo/
├── .eslintrc.js
├── .github/
│ ├── CONTRIBUTING.md
│ ├── FUNDING.yml
│ ├── ISSUE_TEMPLATE/
│ │ ├── Bug_report.md
│ │ └── Feature_request.md
│ ├── PULL_REQUEST_TEMPLATE.md
│ └── workflows/
│ └── test.yml
├── .gitignore
├── Dockerfile
├── LICENSE
├── README.md
├── docker-compose.yml
├── package.json
└── src/
├── PenguBot.js
├── arguments/
│ ├── channelname.js
│ ├── membername.js
│ ├── rolename.js
│ └── username.js
├── commands/
│ ├── Developer/
│ │ ├── eval.js
│ │ ├── exec.js
│ │ ├── setgame.js
│ │ └── togglepatronguild.js
│ ├── Game Statistics/
│ │ ├── clashofclans.js
│ │ ├── csgo.js
│ │ ├── fortnite.js
│ │ └── osu.js
│ ├── Games/
│ │ ├── 8ball.js
│ │ ├── rps.js
│ │ └── slots.js
│ ├── General/
│ │ └── Chat Bot Info/
│ │ ├── donate.js
│ │ ├── help.js
│ │ ├── info.js
│ │ ├── nodeinfo.js
│ │ ├── settings.js
│ │ ├── stats.js
│ │ ├── support.js
│ │ └── upvote.js
│ ├── Images/
│ │ ├── cat.js
│ │ ├── cookie.js
│ │ ├── cuddle.js
│ │ ├── dog.js
│ │ ├── feed.js
│ │ ├── fox.js
│ │ ├── hug.js
│ │ ├── kiss.js
│ │ ├── meme.js
│ │ ├── pat.js
│ │ ├── pengu.js
│ │ ├── poke.js
│ │ ├── punch.js
│ │ ├── randomcomic.js
│ │ ├── slap.js
│ │ ├── tickle.js
│ │ └── wholesome.js
│ ├── Jokes and Stuff/
│ │ ├── chucknorris.js
│ │ ├── compliment.js
│ │ ├── dadjoke.js
│ │ ├── dice.js
│ │ ├── fml.js
│ │ ├── insult.js
│ │ ├── randomfact.js
│ │ ├── trump.js
│ │ └── yomomma.js
│ ├── Management/
│ │ ├── Automod/
│ │ │ ├── manageautomod.js
│ │ │ └── toggleinvites.js
│ │ ├── Autoroles/
│ │ │ ├── addautoroles.js
│ │ │ └── toggleautoroles.js
│ │ ├── Custom Commands/
│ │ │ ├── createcmd.js
│ │ │ ├── deletecmd.js
│ │ │ ├── listcmds.js
│ │ │ ├── togglecustomcmds.js
│ │ │ └── updatecmd.js
│ │ ├── Level Roles/
│ │ │ ├── listlevelroles.js
│ │ │ ├── managelevelroles.js
│ │ │ └── togglelevelroles.js
│ │ ├── Logging/
│ │ │ ├── log.js
│ │ │ ├── loggingchannel.js
│ │ │ └── modlogs.js
│ │ ├── Self Roles/
│ │ │ ├── manageselfroles.js
│ │ │ ├── selfroles.js
│ │ │ └── toggleselfroles.js
│ │ ├── Starboard/
│ │ │ ├── starboard.js
│ │ │ ├── starboardchannel.js
│ │ │ ├── starsrequired.js
│ │ │ └── togglestarboard.js
│ │ └── Welcome & Leave/
│ │ ├── setleavechannel.js
│ │ ├── setleavemsg.js
│ │ ├── setwelcomechannel.js
│ │ ├── setwelcomemsg.js
│ │ ├── toggleleave.js
│ │ └── togglewelcome.js
│ ├── Manipulation/
│ │ ├── achievement.js
│ │ ├── approved.js
│ │ ├── batslap.js
│ │ ├── beautiful.js
│ │ ├── changemymind.js
│ │ ├── facepalm.js
│ │ ├── garbage.js
│ │ ├── illegal.js
│ │ ├── lio.js
│ │ ├── missing.js
│ │ ├── rejected.js
│ │ ├── respect.js
│ │ ├── snap.js
│ │ ├── superpunch.js
│ │ ├── tattoo.js
│ │ ├── tinder.js
│ │ ├── triggered.js
│ │ ├── vault.js
│ │ └── wanted.js
│ ├── Moderation/
│ │ ├── ban.js
│ │ ├── case.js
│ │ ├── history.js
│ │ ├── kick.js
│ │ ├── mute.js
│ │ ├── prune.js
│ │ ├── reason.js
│ │ ├── softban.js
│ │ └── warn.js
│ ├── Music/
│ │ └── music.js
│ ├── Profiles/
│ │ ├── backgrounds.js
│ │ ├── daily.js
│ │ ├── leaderboard.js
│ │ ├── levelup.js
│ │ ├── managexp.js
│ │ ├── profile.js
│ │ ├── rank.js
│ │ ├── rep.js
│ │ ├── snowflakes.js
│ │ └── title.js
│ ├── Settings/
│ │ ├── disablecmd.js
│ │ ├── manageadmin.js
│ │ ├── managedj.js
│ │ ├── managemod.js
│ │ ├── managestaff.js
│ │ ├── prefix.js
│ │ ├── setlanguage.js
│ │ └── togglecategory.js
│ └── Utilities/
│ ├── afk.js
│ ├── avatar.js
│ ├── choose.js
│ ├── covid.js
│ ├── emote.js
│ ├── guild.js
│ ├── lmgtfy.js
│ ├── poll.js
│ ├── quote.js
│ ├── reddit.js
│ ├── remind.js
│ ├── roleinfo.js
│ ├── say.js
│ ├── shorten.js
│ ├── translate.js
│ ├── twstats.js
│ ├── urban.js
│ ├── userinfo.js
│ ├── weather.js
│ └── ytstats.js
├── events/
│ ├── channelCreate.js
│ ├── channelDelete.js
│ ├── commandError.js
│ ├── commandUnknown.js
│ ├── debug.js
│ ├── disconnect.js
│ ├── eventError.js
│ ├── guildBanAdd.js
│ ├── guildBanRemove.js
│ ├── guildCreate.js
│ ├── guildDelete.js
│ ├── guildMemberAdd.js
│ ├── guildMemberRemove.js
│ ├── klasaReady.js
│ ├── messageDelete.js
│ ├── messageDeleteBulk.js
│ ├── messageReactionAdd.js
│ ├── messageReactionRemove.js
│ ├── messageUpdate.js
│ ├── reconnecting.js
│ ├── resumed.js
│ ├── roleCreate.js
│ ├── roleDelete.js
│ └── shardError.js
├── extendables/
│ ├── fetchURL.js
│ └── prompt.js
├── finalizers/
│ └── commandCounter.js
├── functions/
│ ├── friendlyDuration.js
│ ├── images.js
│ ├── isPatron.js
│ ├── isUpvoter.js
│ ├── randomNumber.js
│ └── scrapeSubreddit.js
├── index.js
├── inhibitors/
│ ├── disabledGroup.js
│ ├── patronOnly.js
│ ├── requireDJ.js
│ ├── requireMusic.js
│ └── upvoterOnly.js
├── languages/
│ ├── en-US.js
│ ├── es-ES.js
│ ├── fr-FR.js
│ ├── it-IT.js
│ └── sar-IT.js
├── lib/
│ ├── constants/
│ │ ├── facts.json
│ │ ├── nsfw/
│ │ │ └── subreddits.json
│ │ └── yomomma.json
│ ├── structures/
│ │ ├── KlasaCommand.js
│ │ ├── ModLog.js
│ │ ├── PenguClient.js
│ │ ├── PenguGuild.js
│ │ ├── PenguMember.js
│ │ ├── PenguMemberManager.js
│ │ ├── ServerLog.js
│ │ ├── permissionLevels.js
│ │ └── schemas/
│ │ ├── defaultClientSchema.js
│ │ ├── defaultGuildSchema.js
│ │ ├── defaultMemberSchema.js
│ │ └── defaultUserSchema.js
│ ├── tags/
│ │ ├── getjson.js
│ │ └── sendchannel.js
│ └── util/
│ └── Util.js
├── main.js
├── middlewares/
│ ├── headers.js
│ └── json.js
├── monitors/
│ ├── afk.js
│ ├── antiinvites.js
│ ├── memberProfiles.js
│ ├── perspectivemod.js
│ └── profiles.js
├── providers/
│ └── rethinkdb.js
├── routes/
│ ├── application.js
│ ├── dblHook.js
│ ├── kdhGuild.js
│ ├── pieces.js
│ └── syncdb.js
└── tasks/
├── datadog.js
├── memorySweeper.js
├── reminder.js
├── stats.js
├── tempMute.js
└── timedBan.js
================================================
FILE CONTENTS
================================================
================================================
FILE: .eslintrc.js
================================================
module.exports = {
extends: "eslint:recommended",
env: {
node: true,
es6: true
},
parserOptions: {
ecmaVersion: 9,
sourceType: "module"
},
plugins: [
"promise",
"node"
],
rules: {
"require-atomic-updates": "off",
"no-extra-parens": [
"warn",
"all",
{ nestedBinaryExpressions: false }
],
"valid-jsdoc": [
"warn",
{
requireReturn: false,
requireReturnDescription: false,
preferType: {
String: "string",
Number: "number",
Boolean: "boolean",
Symbol: "symbol",
function: "Function",
object: "Object",
Date: "date",
error: "Error"
}
}
],
"accessor-pairs": "warn",
"array-callback-return": "error",
complexity: "warn",
curly: [
"error",
"multi-line",
"consistent"
],
"dot-location": [
"error",
"property"
],
"dot-notation": "error",
eqeqeq: "error",
"no-console": [
"error",
{
allow: [
"log",
"warn",
"error"
]
}
],
"no-empty-function": "error",
"no-floating-decimal": "error",
"no-implied-eval": "error",
"no-invalid-this": "error",
"no-lone-blocks": "error",
"no-multi-spaces": "error",
"no-new-func": "error",
"no-new-wrappers": "error",
"no-new": "error",
"no-octal-escape": "error",
"no-return-assign": "error",
"no-self-compare": "error",
"no-sequences": "error",
"no-unmodified-loop-condition": "error",
"no-unused-expressions": "error",
"no-useless-call": "error",
"no-useless-escape": "error",
"no-useless-concat": "error",
"no-void": "error",
"no-warning-comments": "warn",
"wrap-iife": "error",
yoda: "error",
"no-label-var": "error",
"no-shadow": "error",
"no-undef-init": "error",
"callback-return": "error",
"handle-callback-err": "error",
"no-mixed-requires": "error",
"no-new-require": "error",
"no-path-concat": "error",
"no-process-env": "error",
"array-bracket-spacing": "error",
"block-spacing": "error",
"brace-style": [
"error",
"1tbs",
{ allowSingleLine: true }
],
"comma-dangle": "error",
"comma-spacing": "error",
"comma-style": "error",
"computed-property-spacing": "error",
"consistent-this": "error",
"eol-last": "error",
"func-names": "error",
"func-style": [
"error",
"declaration",
{ allowArrowFunctions: true }
],
indent: [
"error",
4,
{ SwitchCase: 1 }
],
"key-spacing": "error",
"keyword-spacing": [
"error",
{
overrides: {
if: { after: true },
for: { after: true },
while: { after: true },
catch: { after: true },
switch: { after: true }
}
}
],
"max-depth": "error",
"max-len": [
"error",
1500,
2
],
"max-nested-callbacks": [
"error",
{ max: 4 }
],
"max-statements-per-line": [
"error",
{ max: 2 }
],
"new-cap": "error",
"newline-per-chained-call": [
"error",
{ ignoreChainWithDepth: 6 }
],
"no-array-constructor": "error",
"no-bitwise": "warn",
"no-inline-comments": "error",
"no-lonely-if": "error",
"no-mixed-operators": "error",
"no-multiple-empty-lines": [
"error",
{
max: 2,
maxEOF: 1,
maxBOF: 0
}
],
"no-new-object": "error",
"no-spaced-func": "error",
"no-trailing-spaces": "error",
"no-unneeded-ternary": "error",
"no-whitespace-before-property": "error",
"object-curly-newline": "error",
"object-curly-spacing": [
"error",
"always"
],
"operator-assignment": "error",
"operator-linebreak": [
"error",
"after"
],
"padded-blocks": [
"error",
{
classes: "always",
blocks: "never",
switches: "never"
}
],
"quote-props": [
"error",
"as-needed"
],
quotes: [
"error",
"double",
{
avoidEscape: true,
allowTemplateLiterals: true
}
],
"semi-spacing": "error",
semi: "error",
"space-before-blocks": "error",
"space-before-function-paren": [
"error",
{
anonymous: "always",
named: "never",
asyncArrow: "always"
}
],
"space-in-parens": "error",
"space-infix-ops": "error",
"space-unary-ops": "error",
"spaced-comment": "error",
"unicode-bom": "error",
"arrow-body-style": "error",
"arrow-spacing": "error",
"no-duplicate-imports": "error",
"no-useless-computed-key": "error",
"no-useless-constructor": "error",
"prefer-arrow-callback": "error",
"prefer-const": "error",
"prefer-destructuring": [
"error",
{
VariableDeclarator: {
array: false,
object: true
},
AssignmentExpression: {
array: true,
object: true
}
},
{ enforceForRenamedProperties: false }
],
"prefer-rest-params": "error",
"prefer-spread": "error",
"prefer-template": "error",
"rest-spread-spacing": "error",
"template-curly-spacing": "error",
"yield-star-spacing": "error",
"promise/no-return-wrap": "error",
"promise/catch-or-return": "error",
"promise/no-native": "off",
"promise/no-nesting": "warn",
"promise/no-promise-in-callback": "warn",
"promise/no-callback-in-promise": "warn",
"promise/no-return-in-finally": "warn",
"node/no-missing-require": "off",
"node/no-unpublished-bin": "error",
"node/no-deprecated-api": "error",
"node/exports-style": [
"error",
"module.exports"
],
"no-var": "error",
"arrow-parens": [
"error",
"as-needed"
]
}
};
================================================
FILE: .github/CONTRIBUTING.md
================================================
## Contribute
We love contributors because they make this project even better with their unique talent and skills. If you want to contribute you must know the following this at an intermediate or master level:
- JavaScript (NodeJS)
- Discord.JS (Discord API Wrapper for NodeJS)
- Klasa (Framework we use to create commands, manage settings, etc.)
- Knowledge of how to use Git
## Steps to Start Contributing
1. To start contributing, firstly create a fork of this project and clone it to your computer, you can read more about it here: [How to Fork a Repo](https://help.github.com/articles/fork-a-repo/)
2. Open a console in the repository where you cloned the repository and run `npm install` to install all the required packages to run the bot.
3. Now you would need a few external dependencies to actually run the bot, those dependencies are: RethinkDB Server (Guilds, User, Client Settings) and Lavalink Server (Music Node). You can read how to install RethinkDB [here](https://rethinkdb.com/docs/install/) and Lavalink Server [here](https://github.com/Frederikam/Lavalink#server-configuration).
4. Now you can simply create a `config.json` file by following this empty template [here](https://github.com/AdityaTD/PenguBot/wiki/Default-Config-File).
5. You're now good to go, just run `node start` and the bot should boot up.
6. To start adding new code or manipulating existing one just go through different folders and files and edit them, once you're done just push the changes to your forked repository and create a new pull request from GitHub, if the code is sensible and works then it is most likely that it'll be accepted but it's upto the developers to accept or deny your pull request for any reason.
### Useful Resources
[**Discord.JS Docs**](https://discord.js.org/#/docs/main/master/general/welcome)
[**Klasa Docs**](https://klasa.js.org/#/docs/main/master/Getting%20Started/GettingStarted)
### Basic Empty Klasa Command Example
```js
const { Command } = require('klasa');
module.exports = class extends Command {
constructor(...args) {
super(...args, {
runIn: ['text', 'dm', 'group'], // Text = Guild Channel, DM = DM Channel and Group = Group Channel (For Selfbots)
cooldown: 0, // Command Throttling in Seconds
aliases: [], // Other than the filename, what other words should trigger the command
permissionLevel: 0, // Adding Information On This Soon
requiredPermissions: [], // What permissions should the bot have to be able to use this command.
description: '', // Command Description, will be visible in help command and website.
usage: '', // Define the required, option or semi-required arguments here.
extendedHelp: 'No extended help available.' // Extended help on how to use the command.
});
}
async run(msg, [...params]) {
// This is where you place the code you want to run for your command
}
};
```
================================================
FILE: .github/FUNDING.yml
================================================
# These are supported funding model platforms
github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
patreon: PenguBot
open_collective: # Replace with a single Open Collective username
ko_fi: # Replace with a single Ko-fi username
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
custom: # Replace with a single custom sponsorship URL
================================================
FILE: .github/ISSUE_TEMPLATE/Bug_report.md
================================================
---
name: Bug report
about: Create a report to help us improve
---
**Describe the bug**
A clear and concise description of what the bug is.
**To Reproduce**
Steps to reproduce the behavior:
1. Go to '...'
2. Type command '....'
3. Do something '....'
4. See error
**Expected behavior**
A clear and concise description of what you expected to happen.
**Screenshots**
If applicable, add screenshots to help explain your problem.
**Versions**
- NodeJS: [e.g. 8, 10]
- Klasa [e.g. 0.5.0-dev]
- Discord.JS [e.g. 12]
**Additional context**
Add any other context about the problem here.
================================================
FILE: .github/ISSUE_TEMPLATE/Feature_request.md
================================================
---
name: Feature request
about: Suggest an idea for this project
---
**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
**Describe the solution you'd like**
A clear and concise description of what you want to happen.
**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.
**Additional context**
Add any other context or screenshots about the feature request here.
================================================
FILE: .github/PULL_REQUEST_TEMPLATE.md
================================================
### Description of Your Pull Request
What does your pull request specifically does by adding/modifying or removing code?
### Changes Proposed and or Files Changed
- Example Change
### Label Your Pull Request
- [ ] This PR modifies existing code to enhance the bot
- [ ] This PR fixes a bug within the bot
- [ ] This PR removes/renames methods or properties
- [ ] This PR adds methods, features, commands or properties
================================================
FILE: .github/workflows/test.yml
================================================
name: CI
on:
push:
branches:
- master
pull_request:
jobs:
test:
name: Node v${{ matrix.node_version }} - ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
node_version: [14]
os: [ubuntu-latest]
steps:
- name: Checkout Project
uses: actions/checkout@v1
- name: Use Node.js ${{ matrix.node_version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node_version }}
- name: Restore CI Cache
uses: actions/cache@v1
with:
path: node_modules
key: ${{ runner.os }}-${{ matrix.node_version }}-${{ hashFiles(matrix.os == 'windows-latest' && '**\yarn.lock' || '**/yarn.lock') }}
- name: Install Dependencies
run: |
yarn add https://{{secrets.TOKEN}}:x-oauth-basic@github.com/PenguBot/music.git#build
yarn
- name: Test
run: yarn test
================================================
FILE: .gitignore
================================================
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
# Runtime data
pids
*.pid
*.seed
*.pid.lock
# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov
# Coverage directory used by tools like istanbul
coverage
# nyc test coverage
.nyc_output
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
.grunt
# Bower dependency directory (https://bower.io/)
bower_components
# node-waf configuration
.lock-wscript
# Compiled binary addons (http://nodejs.org/api/addons.html)
build/Release
# Dependency directories
node_modules/
jspm_packages/
# Typescript v1 declaration files
typings/
# Optional npm cache directory
.npm
# Optional eslint cache
.eslintcache
# Optional REPL history
.node_repl_history
# Output of 'npm pack'
*.tgz
# Yarn Integrity file
.yarn-integrity
# dotenv environment variables file
.env
# config file
config.js
# npm lock file
package-lock.json
# VSCode User Data
.vscode
# yarn lock
yarn-error.log
dist
.yarn
.yarnrc
.yarnrc.yml
================================================
FILE: Dockerfile
================================================
FROM node:14.9.0-alpine
RUN mkdir -p /home/pengubot/
WORKDIR /home/pengubot/
RUN apk add --no-cache \
build-base \
cairo-dev \
freetype-dev \
g++ \
gcc \
giflib-dev \
git \
jpeg-dev \
libjpeg-turbo-dev \
musl-dev \
pango-dev \
pangomm-dev \
pixman-dev \
pkgconfig \
python
COPY package.json /home/pengubot/
COPY yarn.lock /home/pengubot/
ARG PAT
RUN sed -i "s|github:pengubot/music#build|git+https://AdityaTD:${PAT}@github.com/PenguBot/music.git#build|g" ./package.json
RUN yarn install --link-duplicates --build-links --production
COPY /src /home/pengubot/src
COPY /assets /home/pengubot/assets
COPY config.js /home/pengubot/config.js
COPY .git /home/pengubot/.git
WORKDIR /home/pengubot/src
CMD ["node", "main.js"]
================================================
FILE: LICENSE
================================================
MIT License
Copyright (c) 2018-2020 Aditya N. Tripathi
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
================================================
FILE: README.md
================================================
<div align="center">
<p align="center"><a href="https://www.pengubot.com"><img src="https://i.imgur.com/smPeYN6.png)"></a></p><br>
<p align="center"><a href="https://travis-ci.org/AdityaTD/PenguBot"><img src="https://img.shields.io/travis/AdityaTD/PenguBot.svg?style=for-the-badge"></a>
<a href="https://discord.gg/u8WYw5r"><img src="https://img.shields.io/discord/303195322514014210.svg?style=for-the-badge"></a>
<a href="https://twitter.com/PenguBot"><img src="https://img.shields.io/twitter/follow/espadrine.svg?style=for-the-badge&label=Follow"></a>
<img src="https://img.shields.io/github/package-json/v/AdityaTD/PenguBot.svg?style=for-the-badge">
<a href="https://status.pengubot.com"><img src="https://img.shields.io/uptimerobot/status/m781763015-e93639facd06b3a9001144c3.svg?style=for-the-badge"></a>
<a href="https://github.com/AdityaTD/PenguBot/blob/master/LICENSE"><img src="https://img.shields.io/github/license/mashape/apistatus.svg?style=for-the-badge"></a>
</p>
<p align="center">PenguBot is mutli-purpose Discord Bot with over 45,500 guilds and 4,000,000 users.<br>
Join <a href="https://discord.gg/u8WYw5r">Discord</a> for Support and Development Discussions</p>
</div>
## Hosting
Get Instant Free €20 Credit on [Hetzner](https://bit.ly/HetznerCloudServers) with No Credit Card! Affordable and High Quality Hosting Services.
[](https://bit.ly/HetznerCloudServers)
## Contributors
[Vlad](https://github.com/KingDGrizzle) - Help with Migration Script for Database
[QuantumlyTangled](https://github.com/QuantumlyTangled) - Translate Command and Music Rewrite
[Ice](https://github.com/iceeMC/) - SoundCloud Playback Support and YouTube RegEx Modification
[Kashall](https://github.com/Kashalls/) - Leaderboard and other help
[Jacz](https://github.com/MrJacz) - Code reviews, Music rewrite, refactoring help. General/Advanced code help and questions.
[Stitch](https://github.com/Soumil07) - Emote Command and Modified Quote Command
## Translators
[RexShardane](https://github.com/alearegis) - IT, SAR
[Rudolfet](https://github.com/Rudolfet) - FR
## Acknowledgement
[Klasa Pieces](https://github.com/dirigeants/klasa-pieces/)
[Dragonfire535](https://github.com/dragonfire535)
[WeebDev](https://github.com/WeebDev/Commando)
[Kyra](https://github.com/kyranet)
[random-puppy](https://github.com/dylang/random-puppy/)
[Jacz](https://github.com/MrJacz)
## Vote on Bot Lists to Support
[](https://discordbots.org/bot/303181184718995457/vote)
[](https://discordbotlist.com/bots/303181184718995457/upvote)
[](https://discord.boats/bot/303181184718995457/vote)
================================================
FILE: docker-compose.yml
================================================
version: '3.8'
services:
pengubot:
container_name: pengubot
image: pengubot
build:
context: .
args:
PAT: ${PAT}
restart: always
network_mode: host
================================================
FILE: package.json
================================================
{
"name": "pengubot",
"version": "2.0.8",
"description": "PenguBot Rewrite for Performance and Stability.",
"main": "src/main.js",
"scripts": {
"start": "node src/main",
"test": "eslint .",
"lint": "eslint --fix ."
},
"repository": {
"type": "git",
"url": "git+https://github.com/AdityaTD/PenguBot.git"
},
"keywords": [
"pengubot",
"pengu",
"bot",
"discord",
"bot",
"discord"
],
"author": "Aditya Nath Tripathi",
"license": "MIT",
"bugs": {
"url": "https://github.com/AdityaTD/PenguBot/issues"
},
"homepage": "https://github.com/AdityaTD/PenguBot#readme",
"dependencies": {
"@k3rn31p4nic/google-translate-api": "^1.1.1",
"@kcp/functions": "github:pengubot/functions#build",
"@lavacord/discord.js": "^0.0.7",
"@pengubot/music": "github:pengubot/music#build",
"breadtags": "github:PenguBot/bread-tags",
"bufferutil": "^4.0.3",
"canvas": "^2.6.0",
"canvas-constructor": "3.0.3",
"discord.js": "^12.5.1",
"hot-shots": "^8.3.0",
"klasa": "github:pengubot/klasa#stable",
"klasa-api": "github:PenguBot/klasa-api#v1-alpha",
"kurasuta": "^2.2.0",
"node-fetch": "^2.6.0",
"node-html-parser": "^2.0.2",
"raven": "^2.6.4",
"rethinkdbdash": "^2.3.31",
"utf-8-validate": "^5.0.4",
"zlib-sync": "^0.1.6"
},
"devDependencies": {
"eslint": "7.17.0",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-promise": "^4.2.1"
}
}
================================================
FILE: src/PenguBot.js
================================================
const { BaseCluster } = require("kurasuta");
const Raven = require("raven");
const config = require("../config.js");
const { execSync } = require("child_process");
Raven.config(config.apis.sentry, {
captureUnhandledRejections: true,
environment: config.production ? "production" : "development",
release: execSync("git rev-parse HEAD").toString()
}).install();
module.exports = class extends BaseCluster {
launch() {
return this.client.login(this.manager.token);
}
};
process.on("uncaughtException", err => Raven.captureException(err));
process.on("unhandledRejection", err => Raven.captureException(err));
================================================
FILE: src/arguments/channelname.js
================================================
const { Argument } = require("../index");
const regex = Argument.regex.channel;
module.exports = class extends Argument {
async run(arg, possible, msg) {
if (!msg.guild) throw "This command can only be used in a server.";
const resChannel = this.resolveChannel(arg, msg.guild);
if (resChannel) return resChannel;
throw "That channel could not be found, please try another one.";
}
resolveChannel(arg, guild) {
const channelID = regex.exec(arg);
return (channelID !== null && guild.channels.cache.get(channelID[1])) || null;
}
};
================================================
FILE: src/arguments/membername.js
================================================
const { Argument, klasaUtil: { regExpEsc }, GuildMember, User } = require("../index");
const USER_REGEXP = Argument.regex.userOrMember;
module.exports = class extends Argument {
async run(arg, possible, msg) {
if (!msg.guild) throw "This command can only be used in guilds.";
const resUser = await this.resolveMember(arg, msg.guild);
if (resUser) return resUser;
const results = [];
const reg = new RegExp(regExpEsc(arg), "i");
for (const member of msg.guild.members.cache.values()) {
if (member.user && reg.test(member.user.username)) results.push(member);
if (member.nickname && reg.test(member.nickname)) results.push(member);
}
let querySearch;
if (results.length > 0) {
const regWord = new RegExp(`\\b${regExpEsc(arg)}\\b`, "i");
const filtered = results.filter(member => (member.user && regWord.test(member.user.username)) || (member.nickname && regWord.test(member.nickname)));
querySearch = filtered.length > 0 ? filtered : results;
} else {
querySearch = results;
}
switch (querySearch.length) {
case 0: throw `${possible.name} Must be a valid name, id or user mention`;
case 1: return querySearch[0];
default: throw `Found multiple matches: \`${querySearch.map(member => member.user.tag).join("`, `")}\``;
}
}
resolveMember(query, guild) {
if (query instanceof GuildMember) return query;
if (query instanceof User) return guild.members.fetch(query);
if (typeof query === "string") {
if (USER_REGEXP.test(query)) return guild.members.fetch(USER_REGEXP.exec(query)[1]).catch(() => null);
if (/\w{1,32}#\d{4}/.test(query)) {
const res = guild.members.cache.find(member => member.user.tag.toLowerCase() === query.toLowerCase());
return res || null;
}
return null;
}
return null;
}
};
================================================
FILE: src/arguments/rolename.js
================================================
// Copyright (c) 2017-2019 dirigeants. All rights reserved. MIT license.
const { Argument, klasaUtil: { regExpEsc }, Role } = require("../index");
const ROLE_REGEXP = Argument.regex.role;
module.exports = class extends Argument {
async run(arg, possible, msg) {
if (!msg.guild) return this.role(arg, possible, msg);
const resRole = this.resolveRole(arg, msg.guild);
if (resRole) return resRole;
const results = [];
const reg = new RegExp(regExpEsc(arg), "i");
for (const role of msg.guild.roles.cache.values()) if (reg.test(role.name)) results.push(role);
let querySearch;
if (results.length > 0) {
const regWord = new RegExp(`\\b${regExpEsc(arg)}\\b`, "i");
const filtered = results.filter(role => regWord.test(role.name));
querySearch = filtered.length > 0 ? filtered : results;
} else {
querySearch = results;
}
switch (querySearch.length) {
case 0: throw `${possible.name} Must be a valid name, id or role mention`;
case 1: return querySearch[0];
default: throw `**Found multiple matches:** \`${querySearch.map(role => role.name).join("`, `")}\``;
}
}
resolveRole(query, guild) {
if (query instanceof Role) return guild.roles.cache.has(query.id) ? query : null;
if (typeof query === "string" && ROLE_REGEXP.test(query)) return guild.roles.cache.get(ROLE_REGEXP.exec(query)[1]);
return null;
}
};
================================================
FILE: src/arguments/username.js
================================================
const { Argument, klasaUtil: { regExpEsc }, GuildMember, User } = require("../index");
const USER_REGEXP = Argument.regex.userOrMember;
module.exports = class extends Argument {
async run(arg, possible, msg) {
if (!msg.guild) return this.store.get("user").run(arg, possible, msg);
const resUser = await this.resolveUser(arg, msg.guild);
if (resUser) return resUser;
const results = [];
const reg = new RegExp(regExpEsc(arg), "i");
for (const member of msg.guild.members.cache.values()) if (reg.test(member.user.username)) results.push(member.user);
let querySearch;
if (results.length > 0) {
const regWord = new RegExp(`\\b${regExpEsc(arg)}\\b`, "i");
const filtered = results.filter(user => regWord.test(user.username));
querySearch = filtered.length > 0 ? filtered : results;
} else {
querySearch = results;
}
switch (querySearch.length) {
case 0: throw `${possible.name} Must be a valid name, id or user mention`;
case 1: return querySearch[0];
default: throw `Found multiple matches: \`${querySearch.map(user => user.tag).join("`, `")}\``;
}
}
resolveUser(query, guild) {
if (query instanceof GuildMember) return query.user;
if (query instanceof User) return query;
if (typeof query === "string") {
if (USER_REGEXP.test(query)) return guild.client.users.fetch(USER_REGEXP.exec(query)[1]).catch(() => null);
if (/\w{1,32}#\d{4}/.test(query)) {
const res = guild.members.cache.find(member => member.user.tag === query);
return res ? res.user : null;
}
}
return null;
}
};
================================================
FILE: src/commands/Developer/eval.js
================================================
const { Command, Stopwatch, Type, klasaUtil: util, util: { haste } } = require("../../index");
const { inspect } = require("util");
module.exports = class extends Command {
constructor(...args) {
super(...args, {
aliases: ["ev"],
description: language => language.get("COMMAND_EVAL_DESCRIPTION"),
extendedHelp: language => language.get("COMMAND_EVAL_EXTENDED"),
guarded: true,
hidden: true,
permissionLevel: 10,
usage: "<expression:str>"
});
}
async run(msg, [code]) {
const flagTime = "wait" in msg.flagArgs ? Number(msg.flagArgs.wait) : 30000;
const { success, result, time, type } = await this.timedEval(msg, code, flagTime);
if (msg.flagArgs.silent) {
if (!success && result && result.stack) this.client.emit("error", result.stack);
return null;
}
const footer = util.codeBlock("ts", type);
const sendAs = msg.flagArgs.output || msg.flagArgs["output-to"] || (msg.flagArgs.log ? "log" : null);
return this.handleMessage(msg, { sendAs, hastebinUnavailable: false, url: null }, { success, result, time, footer });
}
async handleMessage(msg, options, { success, result, time, footer }) {
switch (options.sendAs) {
case "file": {
if (msg.channel.attachable) return msg.send(`**Type:**${footer}\n\n${time}`, { files: [{ attachment: Buffer.from(result), name: "output.txt" }] });
await this.getTypeOutput(msg, options);
return this.handleMessage(msg, options, { success, result, time, footer });
}
case "haste":
case "hastebin": {
if (!options.url) options.url = await haste(result).catch(() => null);
if (options.url) return msg.sendMessage(`**Output:**\n${options.url}\n\n**Type:**${footer}\n${time}`);
options.hastebinUnavailable = true;
await this.getTypeOutput(msg, options);
return this.handleMessage(msg, options, { success, result, time, footer });
}
case "console":
case "log": {
this.client.emit("log", result);
return msg.sendMessage(`${footer}\n${time}`);
}
case "none":
return null;
default: {
if (result.length > 2000) {
await this.getTypeOutput(msg, options);
return this.handleMessage(msg, options, { success, result, time, footer });
}
return msg.sendMessage(msg.language.get(success ? "COMMAND_EVAL_OUTPUT" : "COMMAND_EVAL_ERROR",
time, util.codeBlock("js", result), footer));
}
}
}
async getTypeOutput(msg, options) {
const _options = ["log"];
if (msg.channel.attachable) _options.push("file");
if (!options.hastebinUnavailable) _options.push("hastebin");
let _choice;
do {
_choice = await msg.prompt(`Choose one of the following options: ${_options.join(", ")}`).catch(() => ({ content: "none" }));
} while (!["file", "haste", "hastebin", "console", "log", "default", "none", null].includes(_choice.content));
options.sendAs = _choice.content;
}
timedEval(msg, code, flagTime) {
return Promise.race([
util.sleep(flagTime).then(() => ({
success: false,
result: msg.language.get("COMMAND_EVAL_TIMEOUT", flagTime / 1000),
time: "⏱ ...",
type: "EvalTimeoutError"
})),
this.eval(msg, code)
]);
}
// Eval the input
async eval(msg, code) {
const stopwatch = new Stopwatch();
let success, syncTime, asyncTime, result;
let thenable = false;
let type;
try {
if (msg.flagArgs.async) code = `(async () => {\n${code}\n})();`;
result = eval(code);
syncTime = stopwatch.toString();
type = new Type(result);
if (util.isThenable(result)) {
thenable = true;
stopwatch.restart();
result = await result;
asyncTime = stopwatch.toString();
}
success = true;
} catch (error) {
if (!syncTime) syncTime = stopwatch.toString();
if (thenable && !asyncTime) asyncTime = stopwatch.toString();
if (!type) type = new Type(error);
result = error;
success = false;
}
stopwatch.stop();
if (typeof result !== "string") {
result = result instanceof Error ? result.stack : inspect(result, {
depth: msg.flagArgs.depth ? parseInt(msg.flagArgs.depth) || 0 : 0,
showHidden: Boolean(msg.flagArgs.showHidden)
});
}
return { success, type, time: this.formatTime(syncTime, asyncTime), result: util.clean(result) };
}
formatTime(syncTime, asyncTime) {
return asyncTime ? `⏱ ${asyncTime}<${syncTime}>` : `⏱ ${syncTime}`;
}
};
================================================
FILE: src/commands/Developer/exec.js
================================================
const { Command, util: { exec, codeBlock } } = require("klasa");
module.exports = class extends Command {
constructor(...args) {
super(...args, {
aliases: ["execute"],
description: "-BOT OWNER ONLY-",
guarded: true,
hidden: true,
permissionLevel: 10,
usage: "<expression:string>"
});
}
async run(msg, [input]) {
const result = await exec(input, { timeout: "timeout" in msg.flagArgs ? Number(msg.flagArgs.timeout) : 60000 })
.catch(error => ({ stdout: null, stderr: error }));
const output = result.stdout ? `**\`OUTPUT\`**${codeBlock("prolog", result.stdout)}` : "";
const outerr = result.stderr ? `**\`ERROR\`**${codeBlock("prolog", result.stderr)}` : "";
return msg.sendMessage([output, outerr].join("\n"));
}
};
================================================
FILE: src/commands/Developer/setgame.js
================================================
const Command = require("../../lib/structures/KlasaCommand");
module.exports = class extends Command {
constructor(...args) {
super(...args, {
usageDelim: " ",
subcommands: true,
hidden: true,
aliases: ["sg"],
permissionLevel: 10,
usage: "<text|stream> <game:string> [...]",
description: language => language.get("COMMAND_SG_DESCRIPTION")
});
}
async text(msg, [...game]) {
await this.client.shard.broadcastEval(`this.user.setPresence({ activity: { name: '${game.join(" ")}', status: "online" }})`);
return msg.sendMessage(`**Playing status has been changed to:** ${game.join(" ")}`);
}
async stream(msg, [...game]) {
await this.client.shard.broadcastEval(`this.user.setPresence({ activity: { name: '${game.join(" ")}', type: "STREAMING", status: "online", url: "https://twitch.tv/AdityaTD" }})`);
return msg.sendMessage(`**Playing status has been changed to:** ${game.join(" ")}`);
}
};
================================================
FILE: src/commands/Developer/togglepatronguild.js
================================================
const Command = require("../../lib/structures/KlasaCommand");
module.exports = class extends Command {
constructor(...args) {
super(...args, {
aliases: ["tpg"],
hidden: true,
permissionLevel: 10,
usage: "<guild:string>",
description: language => language.get("COMMAND_TPG_DESCRIPTION")
});
}
async run(msg, [guild]) {
const exists = this.client.settings.get("pGuilds").includes(guild);
await this.client.settings.update("pGuilds", guild);
return msg.sendMessage(`${exists ? "**Removed Guild:**" : "**Added Guild:**"} ${guild}`);
}
};
================================================
FILE: src/commands/Game Statistics/clashofclans.js
================================================
const { Command, MessageEmbed, config } = require("../../index");
module.exports = class extends Command {
constructor(...args) {
super(...args, {
cooldown: 15,
aliases: ["cocstats", "coc"],
requiredPermissions: ["EMBED_LINKS"],
description: language => language.get("COMMAND_COCSTATS_DESCRIPTION"),
usage: "<Tag:string>",
extendedHelp: "No extended help available."
});
}
async run(msg, [tag]) {
const playerData = await this.fetchURL(`https://api.clashofclans.com/v1/players/${encodeURIComponent(tag.toUpperCase())}`, {
headers: { Accept: "application/json", Authorization: `Bearer ${config.apis.cocapi}` }
}).catch(e => {
console.error(e);
throw `${this.client.emotes.cross} ***${msg.language.get("CMD_COC_TAG")}***`;
});
if (!playerData) return msg.reply(msg.language.get("CMD_COC_DATA"));
const embed = new MessageEmbed()
.setColor("#FCCF6E")
.setAuthor(playerData.name, playerData.league ? playerData.league.iconUrls.small : null)
.setThumbnail(`https://coc.guide/static/imgs/other/town-hall-${playerData.townHallLevel}.png`)
.addField("❯ League", playerData.league ? playerData.league.name : "N/A", true)
.addField("❯ Trophies", playerData.trophies, true)
.addField("❯ War Stars", playerData.warStars, true)
.addField("❯ Best Trophies", playerData.bestTrophies, true);
if (playerData.clan) embed.setFooter(`${playerData.role} of ${playerData.clan.name}\u200e ${playerData.clan.tag}`, playerData.clan.badgeUrls.small);
let troopLevels = "", spellLevels = "", heroLevels = "";
for (const troop of playerData.troops) troopLevels += `${troop.name}: ${troop.level} ${troop.level === troop.maxLevel ? "🔥\n" : "\n"}`;
for (const spell of playerData.spells) spellLevels += `${spell.name}: ${spell.level} ${spell.level === spell.maxLevel ? "🔥\n" : "\n"}`;
for (const hero of playerData.heroes) heroLevels += `${hero.name}: ${hero.level} ${hero.level === hero.maxLevel ? "🔥\n" : "\n"}`;
if (troopLevels) embed.addField("❯ Troop Levels", troopLevels, true);
if (spellLevels) embed.addField("❯ Spell Levels", spellLevels, true);
if (heroLevels) embed.addField("❯ Hero Levels", heroLevels, true);
return msg.sendMessage(embed);
}
};
================================================
FILE: src/commands/Game Statistics/csgo.js
================================================
const { Command, MessageEmbed, config } = require("../../index");
module.exports = class extends Command {
constructor(...args) {
super(...args, {
cooldown: 15,
aliases: ["counterstrike"],
requiredPermissions: ["EMBED_LINKS", "ATTACH_FILES"],
description: language => language.get("COMMAND_CSGO_DESCRIPTION"),
usage: "<Username:string>",
extendedHelp: "No extended help available."
});
}
async run(msg, [username]) {
try {
const userData = await this.fetchURL(`http://api.steampowered.com/ISteamUser/ResolveVanityURL/v0001/`, {
query: { key: config.apis.csgo, vanityurl: username }
});
if (userData.response.success !== 1) throw `${this.client.emotes.cross} ***${msg.language.get("CMD_CSGO_NF")}***`;
const steamID = userData.response.steamid;
const userStats = await this.fetchURL(`http://api.steampowered.com/ISteamUserStats/GetUserStatsForGame/v0002/`, {
query: { key: config.apis.csgo, appid: 730, steamid: steamID }
});
const { stats } = userStats.playerstats;
return msg.sendMessage(new MessageEmbed()
.setAuthor("Counter Strike : Global Offensive - PenguBot", "https://i.imgur.com/0S2t2qQ.png")
.setFooter("© PenguBot.com")
.setThumbnail("https://i.imgur.com/0S2t2qQ.png")
.setColor("#FB9E01")
.setTimestamp()
.addField("❯ Steam Username", username, true)
.addField("❯ KDR", (stats ? stats.find(a => a.name === "total_kills").value / stats.find(a => a.name === "total_deaths").value : 0).toFixed(2), true)
.addField("❯ Total Kills", stats.find(a => a.name === "total_kills") ? stats.find(a => a.name === "total_kills").value.toLocaleString() : 0, true)
.addField("❯ Total Deaths", stats.find(a => a.name === "total_deaths") ? stats.find(a => a.name === "total_deaths").value.toLocaleString() : 0, true)
.addField("❯ Total Wins", stats.find(a => a.name === "total_wins") ? stats.find(a => a.name === "total_wins").value.toLocaleString() : 0, true)
.addField("❯ Total MVPs", stats.find(a => a.name === "total_mvps") ? stats.find(a => a.name === "total_mvps").value.toLocaleString() : 0, true)
.addField("❯ Time Played (Not Idle)", `${stats ? (stats.find(a => a.name === "total_time_played").value / 60 / 60).toFixed(2) : 0} Hour(s)`, true)
.addField("❯ Knife Kills", stats.find(a => a.name === "total_kills_knife") ? stats.find(a => a.name === "total_kills_knife").value.toLocaleString() : 0, true));
} catch (e) {
return msg.reply("Oopsie! I came across an error, please try again or contact us!");
}
}
};
================================================
FILE: src/commands/Game Statistics/fortnite.js
================================================
const { Command, MessageEmbed, config } = require("../../index");
module.exports = class extends Command {
constructor(...args) {
super(...args, {
cooldown: 15,
aliases: ["fnbr", "fnbrstats", "fortnitestats"],
permissionLevel: 0,
requiredPermissions: ["EMBED_LINKS", "ATTACH_FILES"],
description: language => language.get("COMMAND_FORTNITE_DESCRIPTION"),
usage: "<pc|xbox|psn> <Username:...string>",
usageDelim: " ",
extendedHelp: "No extended help available."
});
}
async run(msg, [platform, username]) {
const data = await this.fetchURL(`https://api.fortnitetracker.com/v1/profile/${platform}/${encodeURIComponent(username)}`, {
headers: { "TRN-Api-Key": config.apis.fortnite }
});
if (!data) throw `${this.client.emotes.cross} ***${msg.language.get("CMD_FORT_PLAT")}***`;
if (data.error) throw `${this.client.emotes.cross} ***${msg.language.get("CMD_FORT_ERR")}***`;
return msg.sendEmbed(new MessageEmbed()
.setAuthor("Fortnite Battle Royale Statistics - PenguBot", "https://i.imgur.com/EER1jFB.png")
.setFooter("© PenguBot.com")
.setThumbnail("https://i.imgur.com/EER1jFB.png")
.setColor("#151842")
.setTimestamp()
.setDescription([`❯ **Epic Username:** ${data.epicUserHandle}`,
`❯ **Score:** ${data.lifeTimeStats.find(a => a.key === "Score") ? data.lifeTimeStats.find(a => a.key === "Score").value.toLocaleString() : "N/A"}`,
`❯ **Matches Played:** ${data.lifeTimeStats.find(a => a.key === "Matches Played") ? data.lifeTimeStats.find(a => a.key === "Matches Played").value.toLocaleString() : "N/A"}`,
`❯ **Kills:** ${data.lifeTimeStats.find(a => a.key === "Kills") ? data.lifeTimeStats.find(a => a.key === "Kills").value.toLocaleString() : "N/A"}`,
`❯ **Wins:** ${data.lifeTimeStats.find(a => a.key === "Wins") ? data.lifeTimeStats.find(a => a.key === "Wins").value.toLocaleString() : "N/A"}`,
`❯ **K/D:** ${data.lifeTimeStats.find(a => a.key === "K/d") ? data.lifeTimeStats.find(a => a.key === "K/d").value : "N/A"}`,
`❯ **Top 3s:** ${data.lifeTimeStats.find(a => a.key === "Top 3s") ? data.lifeTimeStats.find(a => a.key === "Top 3s").value.toLocaleString() : "N/A"}`,
`❯ **Platform:** ${data.platformNameLong}`]));
}
};
================================================
FILE: src/commands/Game Statistics/osu.js
================================================
const { Command, config, MessageEmbed, Duration } = require("../../index");
module.exports = class extends Command {
constructor(...args) {
super(...args, {
cooldown: 8,
aliases: ["osustats"],
requiredPermissions: ["ATTACH_FILES", "USE_EXTERNAL_EMOJIS", "EMBED_LINKS"],
description: language => language.get("COMMAND_OSU_DESCRIPTION"),
extendedHelp: "No extended help available.",
usage: "<username:str>"
});
}
async run(msg, [username]) {
const data = await this.fetchURL(`https://osu.ppy.sh/api/get_user`, { type: "json", query: { k: config.apis.osu, u: encodeURIComponent(username) } }).then(a => a[0]).catch(() => null);
if (!data) return msg.reply(msg.language.get("CMD_OSU_ERR"));
const embed = new MessageEmbed()
.setThumbnail(`https://a.ppy.sh/${data.user_id}`)
.setColor("#EF5E9F")
.setAuthor(data.username, `https://a.ppy.sh/${data.user_id}`, "https://pengubot.com")
.addField("Total Score", Number(data.total_score).toLocaleString(), true)
.addField("Ranked Score", Number(data.ranked_score).toLocaleString(), true)
.addField("Level", Number(data.level).toFixed(0).toLocaleString(), true)
.addField("Count 50", Number(data.count50).toLocaleString(), true)
.addField("Count 100", Number(data.count100).toLocaleString(), true)
.addField("Count 300", Number(data.count300).toLocaleString(), true)
.addField("Global Rank", Number(data.pp_rank).toLocaleString(), true)
.addField("SS Rank", Number(data.count_rank_ss).toLocaleString(), true)
.addField("SSH Rank", Number(data.count_rank_ssh).toLocaleString(), true)
.addField("S Rank", Number(data.count_rank_s).toLocaleString(), true)
.addField("A Rank", Number(data.count_rank_a).toLocaleString(), true)
.addField("Accuracy", `${Number(data.accuracy).toFixed(2)}%`, true)
.addField("Time Played", Duration.toNow(Date.now() - (data.total_seconds_played * 1000)), true)
.setFooter("© PenguBot.com");
return msg.channel.send({ embed });
}
};
================================================
FILE: src/commands/Games/8ball.js
================================================
const Command = require("../../lib/structures/KlasaCommand");
const answers = [
"Maybe.", "Certainly not.", "I hope so.", "Not in your wildest dreams.",
"There is a good chance.", "Quite likely.", "I think so.",
"I hope not.", "I hope so.", "Never!", "Fuhgeddaboudit.",
"Ahaha! Really?!?", "Pfft.", "Sorry, bucko.",
"Hell, yes.", "Hell to the no.", "The future is bleak.",
"The future is uncertain.", "I would rather not say.", "Who cares?",
"Possibly.", "Never, ever, ever.", "There is a small chance.", "Yes!"];
module.exports = class extends Command {
constructor(...args) {
super(...args, {
cooldown: 8,
aliases: ["yesorno"],
description: language => language.get("COMMAND_8BALL_DESCRIPTION"),
extendedHelp: "No extended help available.",
usage: "<question:string>"
});
}
async run(msg) {
return msg.reply(`🎱 ${answers[Math.floor(Math.random() * answers.length)]}`);
}
};
================================================
FILE: src/commands/Games/rps.js
================================================
const Command = require("../../lib/structures/KlasaCommand");
const choices = ["rock", "paper", "scissors"];
module.exports = class extends Command {
constructor(...args) {
super(...args, {
cooldown: 8,
aliases: ["rockpaperscissors", "rpsgame"],
requiredPermissions: ["ATTACH_FILES", "EMBED_LINKS"],
description: language => language.get("COMMAND_RPS_DESCRIPTION"),
extendedHelp: "No extended help available.",
usage: "<move:string>"
});
}
async run(msg, [move]) {
if (!move.match(/Rock|Paper|Scissors/i)) return msg.reply(`${msg.language.get("CMD_RPS_INVALID")} \`rock\`. \`paper\` or \`scissors\`.`);
const outcome = choices[Math.floor(Math.random() * choices.length)];
const choice = move.toLowerCase();
if (choice === "rock") {
if (outcome === "rock") return msg.reply("***Rock! That's a tie!***");
if (outcome === "paper") return msg.reply("***Paper! I win, you lose!***");
if (outcome === "scissors") return msg.reply("***Scissors! No! You won...***");
}
if (choice === "paper") {
if (outcome === "rock") return msg.reply("***Rock! No! You won...***");
if (outcome === "paper") return msg.reply("***Paper! Yeah! That's a tie!***");
if (outcome === "scissors") return msg.reply("***Scissors! I win, you lose!***");
}
if (choice === "scissors") {
if (outcome === "rock") return msg.reply("***Rock! I win, you lose!***");
if (outcome === "paper") return msg.reply("***Paper! No! You won...***");
if (outcome === "scissors") return msg.reply("***Scissors! Yeah! That's a tie!***");
}
}
};
================================================
FILE: src/commands/Games/slots.js
================================================
const Command = require("../../lib/structures/KlasaCommand");
const slots = ["🍔", "🍟", "🌭", "🍕", "🌮", "🍘", "🍫", "🍿", "🍩"];
const { MessageEmbed } = require("discord.js");
module.exports = class extends Command {
constructor(...args) {
super(...args, {
cooldown: 8,
aliases: ["slotsroll"],
requiredPermissions: ["USE_EXTERNAL_EMOJIS", "EMBED_LINKS"],
description: language => language.get("COMMAND_SLOTS_DESCRIPTION"),
extendedHelp: "No extended help available.",
usage: "[Snowflakes:integer]"
});
}
async run(msg, [Snowflakes = 1]) {
if (Snowflakes < 1) return msg.reply(`${msg.language.get("CMD_SLOTS_INVALID")}`);
await msg.author.settings.sync(true);
if (msg.author.settings.get("snowflakes") < Snowflakes) return msg.reply(`❄ You don't have \`${Snowflakes}\` Snowflakes to use slots, use \`${msg.guild.settings.prefix}daily\` command to get some for free!`);
const Mone = slots[Math.floor(Math.random() * slots.length)];
const Mtwo = slots[Math.floor(Math.random() * slots.length)];
const Mthree = slots[Math.floor(Math.random() * slots.length)];
const Tone = slots[Math.floor(Math.random() * slots.length)];
const Ttwo = slots[Math.floor(Math.random() * slots.length)];
const Tthree = slots[Math.floor(Math.random() * slots.length)];
const Bone = slots[Math.floor(Math.random() * slots.length)];
const Btwo = slots[Math.floor(Math.random() * slots.length)];
const Bthree = slots[Math.floor(Math.random() * slots.length)];
if (Mone === Mtwo || Mone === Mthree || Mthree === Mtwo) {
const flakesPercent = Math.round(Snowflakes * 60 / 100) >= 1 ? Math.round(Snowflakes * 50 / 100) : 1;
const winFlakes = msg.author.settings.get("snowflakes") + Snowflakes + flakesPercent;
const embed = new MessageEmbed()
.setFooter("© PenguBot.com")
.setTimestamp()
.setDescription(`${Tone} | ${Ttwo} | ${Tthree}\n${Mone} | ${Mtwo} | ${Mthree}\n${Bone} | ${Btwo} | ${Bthree}`)
.setColor("#43A047");
await msg.author.settings.update("snowflakes", winFlakes);
return msg.sendMessage(`***${msg.author} You just won ❄ \`${flakesPercent}\`, you now have ❄ \`${msg.author.settings.get("snowflakes")}\`! Good job!***`, { embed: embed });
}
const embed = new MessageEmbed()
.setFooter("© PenguBot.com")
.setTimestamp()
.setDescription(`${Tone} | ${Ttwo} | ${Tthree}\n${Mone} | ${Mtwo} | ${Mthree}\n${Bone} | ${Btwo} | ${Bthree}`)
.setColor("#d32f2f");
await msg.author.settings.update("snowflakes", msg.author.settings.get("snowflakes") - Snowflakes);
return msg.sendMessage(`***${msg.author} You lost ❄ \`${Snowflakes}\`, you now have ❄ \`${msg.author.settings.get("snowflakes")}\`! Better luck next time!***`, { embed: embed });
}
};
================================================
FILE: src/commands/General/Chat Bot Info/donate.js
================================================
const Command = require("../../../lib/structures/KlasaCommand");
const { MessageEmbed } = require("discord.js");
module.exports = class extends Command {
constructor(...args) {
super(...args, {
aliases: ["patreon", "patron", "premium"],
guarded: true,
requiredPermissions: ["EMBED_LINKS", "ATTACH_FILES"],
description: language => language.get("COMMAND_DONATE_DESCRIPTION")
});
}
async run(msg) {
const embed = new MessageEmbed()
.setDescription(msg.language.get("COMMAND_DONATE"))
.setAuthor("PenguBot - Premium", this.client.user.displayAvatarURL(), "https://www.pengubot.com")
.setThumbnail("https://i.imgur.com/bSOBK4s.png")
.setColor("RANDOM");
return msg.sendEmbed(embed);
}
};
================================================
FILE: src/commands/General/Chat Bot Info/help.js
================================================
const { Command, klasaUtil: { isFunction }, MessageEmbed } = require("../../../index");
module.exports = class extends Command {
constructor(...args) {
super(...args, {
aliases: ["commands"],
guarded: true,
requiredPermissions: ["EMBED_LINKS"],
description: language => language.get("COMMAND_HELP_DESCRIPTION"),
usage: "(Command:cmd)"
});
this.createCustomResolver("cmd", (arg, possible, msg) => {
if (!arg || arg === "") return undefined;
return this.client.arguments.get("cmd").run(arg, possible, msg);
});
}
async run(msg, [cmd]) {
if (cmd) {
const cmdEmbed = new MessageEmbed()
.setDescription([`❯ **Command:** ${cmd.name}`,
`❯ **Description:** ${isFunction(cmd.description) ? cmd.description(msg.language) : cmd.description}`,
`❯ **Usage:** ${cmd.usage.fullUsage(msg)}`,
`❯ **Extended Help:** ${isFunction(cmd.extendedHelp) ? cmd.extendedHelp(msg.language) : cmd.extendedHelp}`]);
return msg.sendEmbed(cmdEmbed);
}
let prefixHelp;
if (msg.guild) prefixHelp = `PenguBot's Prefix ${msg.guild ? `in ${msg.guild.name} is \`${msg.guild.settings.get("prefix")}\`. i.e. \`${msg.guild.settings.get("prefix")}dog\`` : `is \`p!\`. i.e. \`p!dog\``}`;
const embed = new MessageEmbed()
.setAuthor("PenguBot - Help", this.client.user.displayAvatarURL(), "https://www.pengubot.com")
.setDescription([prefixHelp,
"",
`❯ **List of Commands:** [PenguBot.com/commands](https://www.pengubot.com/commands)`,
`❯ **Official Discord Server:** [PenguBot.com/support](https://www.pengubot.com/support)`,
`❯ **Add PenguBot to Your Server:** [PenguBot.com/invite](https://www.pengubot.com/invite)`,
`❯ **PenguBot Premium:** [PenguBot.com/premium](https://pengubot.com/premium)`])
.setTimestamp()
.setColor("RANDOM")
.setFooter("PenguBot.com");
return msg.sendEmbed(embed);
}
};
================================================
FILE: src/commands/General/Chat Bot Info/info.js
================================================
const Command = require("../../../lib/structures/KlasaCommand");
const { MessageEmbed } = require("discord.js");
module.exports = class extends Command {
constructor(...args) {
super(...args, {
aliases: ["details", "what"],
guarded: true,
requiredPermissions: ["EMBED_LINKS"],
description: language => language.get("COMMAND_INFO_DESCRIPTION")
});
}
async run(msg) {
const embed = new MessageEmbed()
.setDescription(msg.language.get("COMMAND_INFO"))
.setAuthor("PenguBot - Information", this.client.user.displayAvatarURL(), "https://www.pengubot.com")
.setColor("RANDOM");
return msg.sendEmbed(embed);
}
};
================================================
FILE: src/commands/General/Chat Bot Info/nodeinfo.js
================================================
const Command = require("../../../lib/structures/KlasaCommand");
const { MessageEmbed } = require("discord.js");
module.exports = class extends Command {
constructor(...args) {
super(...args, {
requiredPermissions: [],
aliases: ["nodesinfo"],
cooldown: 5,
description: "",
extendedHelp: "No extended help available."
});
}
async run(msg) {
const embed = new MessageEmbed()
.setAuthor("PenguBot's Music Nodes Information", this.client.user.displayAvatarURL(), "https://www.pengubot.com")
.setTimestamp()
.setFooter("© PenguBot.com");
for (const node of this.client.lavalink.nodes.values()) {
embed.addField(node.id, `**Players:** ${node.stats.playingPlayers} / ${node.stats.players}
**Memory:** ${(node.stats.memory.used / 1024 / 1024).toFixed(2)} / ${(node.stats.memory.allocated / 1024 / 1024).toFixed(2)}
**CPU:** ${node.stats.cpu.systemLoad.toFixed(2) * 100}%`, true);
}
return msg.sendEmbed(embed);
}
};
================================================
FILE: src/commands/General/Chat Bot Info/settings.js
================================================
const { Command, RichDisplay, MessageEmbed } = require("../../../index");
module.exports = class extends Command {
constructor(...args) {
super(...args, {
runIn: ["text"],
cooldown: 5,
aliases: ["configure", "setup"],
permissionLevel: 6,
requiredPermissions: ["USE_EXTERNAL_EMOJIS", "EMBED_LINKS"],
description: "Configure PenguBot on your server.",
extendedHelp: "No extended help available.",
usage: "[general|music|autoroles|levelroles|selfroles|automod|logs|moderation|starboard|customcommands|greetings] [setting:string] [value:string] [...]",
usageDelim: " ",
guarded: true,
subCommands: true
});
}
async run(msg, [type, ...params]) {
if (type) return this[type](msg, params);
const prefix = msg.guild.settings.get("prefix") || "p!";
const embed = new MessageEmbed()
.setAuthor("Server Settings", msg.guild.iconURL(), "https://pengubot.com")
.setDescription(`Configure PenguBot to your liking on **${msg.guild.name}** and recieve helpful tips per category.`)
.addField("⚙️ General", `\`\`\`${prefix}settings general\`\`\``, true)
.addField("🎵 Music", `\`\`\`${prefix}settings music\`\`\``, true)
.addField("🧑🦱 Auto Join Roles", `\`\`\`${prefix}settings autoroles\`\`\``, true)
.addField("⬆️ Level Based Roles", `\`\`\`${prefix}settings levelroles\`\`\``, true)
.addField("🙇 Self Assignable Roles", `\`\`\`${prefix}settings selfroles\`\`\``, true)
.addField("🗨️ Logging", `\`\`\`${prefix}settings logs\`\`\``, true)
.addField("🤖 AI Moderation", `\`\`\`${prefix}settings automod\`\`\``, true)
.addField("⚔️ Moderation", `\`\`\`${prefix}settings moderation\`\`\``, true)
.addField("⭐ Starboard", `\`\`\`${prefix}settings starboard\`\`\``, true)
.addField("🛠️ Custom Commands", `\`\`\`${prefix}settings customcommands\`\`\``, true)
.addField("💁 Welcome and Leave Messages", `\`\`\`${prefix}settings greetings\`\`\``, true)
.setFooter("PenguBot.com")
.setTimestamp();
return msg.sendEmbed(embed);
}
// --- GENERAL SETTINGS ---
async general(msg, [setting, value]) {
if (!setting) {
const prefix = msg.guild.settings.get("prefix") || "p!";
const embed = new MessageEmbed()
.setTitle("⚙️ General - Settings")
.addField("Prefix", `\`\`\`${prefix}settings general prefix <prefix>\`\`\``)
.addField("Toggle a Command", `\`\`\`${prefix}settings general togglecmd <command>\`\`\``)
.addField("Toggle a Command Category", `\`\`\`${prefix}settings general togglecategory <category>\`\`\``)
.addField("Change Language", `\`\`\`${prefix}settings general language <language>\`\`\``)
.addField("Toggle Levelup Messages", `\`\`\`${prefix}settings general togglelevelup\`\`\``)
.addField("Change Levelup Type", `\`\`\`${prefix}settings general leveluptype <guild or global>\`\`\``)
.setFooter("PenguBot.com")
.setTimestamp();
return msg.sendEmbed(embed);
}
setting = setting.toLowerCase();
switch (setting) {
case "prefix": {
await this.client.commands.get("prefix").run(msg, [value]);
break;
}
case "togglecmd": {
if (!value) return msg.reply("You must specify a command to toggle.");
const arg = await this.client.arguments.get("command").run(value);
if (arg.guarded) return msg.reply("This command can not be disabled as it's required by PenguBot for configuration.");
await this.client.commands.get("disablecmd").run(msg, [arg]);
break;
}
case "togglecategory": {
if (!value) return msg.reply("You must specify a command category to toggle.");
await this.client.commands.get("togglecategory").run(msg, [value]);
break;
}
case "language": {
if (!value) return msg.reply("You must specify a language to use this command.");
await this.client.commands.get("setlanguage").run(msg, [value]);
break;
}
case "togglelevelup": {
await this.client.commands.get("levelup").toggle(msg);
break;
}
case "leveluptype": {
if (!value) return msg.reply("You must specify a type for level up messages from `guild` or `global`.");
await this.client.commands.get("levelup").type(msg, [value]);
break;
}
default: {
await msg.reply("That setting is not a valid option, please select a valid setting to update.");
}
}
}
// --- MUSIC SETTINGS ---
async music(msg, [setting, ...value]) {
if (!setting) {
const prefix = msg.guild.settings.get("prefix") || "p!";
const embed = new MessageEmbed()
.setTitle("🎵 Music - Settings")
.addField("Volume", `\`\`\`${prefix}settings music volume [volume]\`\`\``)
.addField("Toggle DJ Mode", `\`\`\`${prefix}settings music toggledj\`\`\``)
.addField("Add DJ Member/Role", `\`\`\`${prefix}managedj add <role|user>\`\`\``)
.addField("Remove DJ Member/Role", `\`\`\`${prefix}managedj remove <role|user>\`\`\``)
.addField("List DJ Members/Roles", `\`\`\`${prefix}managedj list\`\`\``)
.setFooter("PenguBot.com")
.setTimestamp();
return msg.sendEmbed(embed);
}
setting = setting.toLowerCase();
switch (setting) {
case "volume": {
await this.client.commands.get("volume").run(msg, [value.length ? value[0] : ""]);
break;
}
case "toggledj": {
await this.client.commands.get("toggledj").run(msg);
break;
}
default: {
await msg.reply("That setting is not a valid option, please select a valid setting to update.");
}
}
}
// --- AUTOROLES SETTINGS ---
async autoroles(msg, [setting]) {
if (!setting) {
const prefix = msg.guild.settings.get("prefix") || "p!";
const embed = new MessageEmbed()
.setTitle("🧑🦱 Auto Join Roles - Settings")
.setDescription("**Info:** These roles get added to a user as soon as they join the server.")
.addField("Add Auto Role", `\`\`\`${prefix}addautorole <role>\`\`\``)
.addField("Remove Auto Role", `\`\`\`${prefix}removeautorole <role>\`\`\``)
.addField("Toggle Auto Roles", `\`\`\`${prefix}settings autoroles toggle\`\`\``)
.addField("List Auto Roles", `\`\`\`${prefix}settings autoroles list\`\`\``)
.setFooter("PenguBot.com")
.setTimestamp();
return msg.sendEmbed(embed);
}
setting = setting.toLowerCase();
switch (setting) {
case "toggle": {
await this.client.commands.get("toggleautoroles").run(msg);
break;
}
case "list": {
const roles = msg.guild.settings.get("roles.autorole");
if (!roles.length) return msg.sendMessage(`${this.client.emotes.cross} There are currently no auto join roles set for this server.`);
const pages = new RichDisplay(new MessageEmbed()
.setTitle("Use the reactions to change pages, select a page, or stop viewing the roles")
.setAuthor("List of Auto Join Roles", msg.guild.iconURL())
.setDescription("Scroll between pages to see the self assignable roles.")
.setColor("#428bca")
);
pages.addPage(t => t.setDescription(roles.map(role => `\`-\` ${msg.guild.roles.cache.get(role) || "Role Removed"}`).join("\n")));
pages.run(await msg.sendMessage(`${this.client.emotes.loading} ***Loading Roles...***`), {
time: 120000,
filter: (reaction, user) => user === msg.author
});
break;
}
default: {
await msg.reply("That setting is not a valid option, please select a valid setting to update.");
}
}
}
// --- LEVEL ROLES SETTINGS ---
async levelroles(msg, [setting]) {
if (!setting) {
const prefix = msg.guild.settings.get("prefix") || "p!";
const embed = new MessageEmbed()
.setTitle("⬆️ Level Roles - Settings")
.setDescription("**Info:** These roles get added to a user as soon as they level up to a particular level on the server.")
.addField("Add Level Role", `\`\`\`${prefix}managelevelrole add <role> <level>\`\`\``)
.addField("Remove Level Role", `\`\`\`${prefix}managelevelrole remove <role> <level>\`\`\``)
.addField("Toggle Level Roles", `\`\`\`${prefix}settings levelroles toggle\`\`\``)
.addField("List Level Roles", `\`\`\`${prefix}settings levelroles list\`\`\``)
.setFooter("PenguBot.com")
.setTimestamp();
return msg.sendEmbed(embed);
}
setting = setting.toLowerCase();
switch (setting) {
case "toggle": {
await this.client.commands.get("togglelevelroles").run(msg);
break;
}
case "list": {
await this.client.commands.get("listlevelroles").run(msg);
break;
}
default: {
await msg.reply("That setting is not a valid option, please select a valid setting to update.");
}
}
}
// --- SELF ROLES SETTINGS ---
async selfroles(msg, [setting]) {
if (!setting) {
const prefix = msg.guild.settings.get("prefix") || "p!";
const embed = new MessageEmbed()
.setTitle("🙇 Self Assignable Roles - Settings")
.setDescription("**Info:** These roles can be self assigned or removed by a user on themselves.")
.addField("Add/Remove Self Role", `\`\`\`${prefix}manageselfrole <role>\`\`\``)
.addField("Toggle Self Roles", `\`\`\`${prefix}settings selfroles toggle\`\`\``)
.addField("List Self Roles", `\`\`\`${prefix}settings selfroles list\`\`\``)
.setFooter("PenguBot.com")
.setTimestamp();
return msg.sendEmbed(embed);
}
setting = setting.toLowerCase();
switch (setting) {
case "toggle": {
await this.client.commands.get("toggleselfroles").run(msg);
break;
}
case "list": {
await this.client.commands.get("selfroles").list(msg);
break;
}
default: {
await msg.reply("That setting is not a valid option, please select a valid setting to update.");
}
}
}
// --- AUTO MODERATION SETTINGS ---
async automod(msg, [setting]) {
if (!setting) {
const prefix = msg.guild.settings.get("prefix") || "p!";
const embed = new MessageEmbed()
.setTitle("🤖 AI and Auto Moderation - Settings")
.setDescription([
"**Info:** AI Moderation system reads the message a user has sent and according to the defined threshold it will filter out the messages to keep your server clean.",
"By using AI moderation, you agree to [PenguBot's Privacy Policy](https://pengubot.com/privacy)."
].join("\n"))
.addField("Toggle Invites Deletion", `\`\`\`${prefix}settings automod invites\`\`\``)
.addField("Toggle AI Moderation Filter", `\`\`\`${prefix}automod toggle [filter]\`\`\``)
.addField("Change AI Filter Threshold", `\`\`\`${prefix}automod <filter> <value>\`\`\``)
.setFooter("PenguBot.com")
.setTimestamp();
return msg.sendEmbed(embed);
}
setting = setting.toLowerCase();
switch (setting) {
case "invites": {
await this.client.commands.get("toggleinvites").run(msg);
break;
}
default: {
await msg.reply("That setting is not a valid option, please select a valid setting to update.");
}
}
}
// --- LOGGING SETTINGS ---
async logs(msg, [setting, ...value]) {
if (!setting) {
const prefix = msg.guild.settings.get("prefix") || "p!";
const embed = new MessageEmbed()
.setTitle("🗨️ Logs - Settings")
.setDescription("**Info:** Server logs are general user activity based and mod logs are based on moderative actions.")
.addField("Server Logs Channel", `\`\`\`${prefix}settings logs serverchannel <channel>\`\`\``)
.addField("Toggle Server Logs", `\`\`\`${prefix}settings logs servertoggle [type]\`\`\``)
.addField("Moderation Logs Channel", `\`\`\`${prefix}settings logs modchannel <channel>\`\`\``)
.addField("Toggle Moderation Logs", `\`\`\`${prefix}settings logs modtoggle\`\`\``)
.setFooter("PenguBot.com")
.setTimestamp();
return msg.sendEmbed(embed);
}
setting = setting.toLowerCase();
switch (setting) {
case "serverchannel": {
if (!value.length) return msg.reply("You must provide a channel to use this setting.");
const arg = await this.client.arguments.get("channelname").run(value[0], null, msg);
await this.client.commands.get("loggingchannel").run(msg, [arg]);
break;
}
case "servertoggle": {
await this.client.commands.get("log").run(msg, [value.length ? value[0] : null]);
break;
}
case "modchannel": {
if (!value.length) return msg.reply("You must provide a channel to use this setting.");
const arg = await this.client.arguments.get("channelname").run(value[0], null, msg);
await this.client.commands.get("modlogs").channel(msg, [arg]);
break;
}
case "modtoggle": {
await this.client.commands.get("modlogs").toggle(msg);
break;
}
default: {
await msg.reply("That setting is not a valid option, please select a valid setting to update.");
}
}
}
// --- MODERATION SETTINGS ---
async moderation(msg) {
const prefix = msg.guild.settings.get("prefix") || "p!";
const embed = new MessageEmbed()
.setTitle("⚔️ Moderation - Settings")
.addField("Add Pengu Admin User/Role", `\`\`\`${prefix}manageadmin add <user|role>\`\`\``)
.addField("Remove Pengu Admin User/Role", `\`\`\`${prefix}manageadmin remove <user|role>\`\`\``)
.addField("List Pengu Admin Users/Roles", `\`\`\`${prefix}manageadmin list\`\`\``)
.addField("Add Pengu Moderator User/Role", `\`\`\`${prefix}managemod add <user|role>\`\`\``)
.addField("Remove Pengu Moderator User/Role", `\`\`\`${prefix}managemod remove <user|role>\`\`\``)
.addField("List Pengu Moderator Users/Roles", `\`\`\`${prefix}managemod list\`\`\``)
.setFooter("PenguBot.com")
.setTimestamp();
return msg.sendEmbed(embed);
}
// --- STARBOARD SETTINGS ---
async starboard(msg, [setting, ...value]) {
if (!setting) {
const prefix = msg.guild.settings.get("prefix") || "p!";
const embed = new MessageEmbed()
.setTitle("⭐ Starboad - Settings")
.addField("Toggle Starboard", `\`\`\`${prefix}settings starboard toggle\`\`\``)
.addField("Stars Requirement", `\`\`\`${prefix}settings starboard required <number>\`\`\``)
.addField("Starboard Channel", `\`\`\`${prefix}settings starboard channel <channel>\`\`\``)
.setFooter("PenguBot.com")
.setTimestamp();
return msg.sendEmbed(embed);
}
setting = setting.toLowerCase();
switch (setting) {
case "toggle": {
await this.client.commands.get("togglestarboard").run(msg);
break;
}
case "required": {
if (!value.length) return msg.reply("You must specify a number.");
let num;
try {
num = Number.parseInt(value[0]);
} catch (e) {
return msg.reply("Not a valid number.");
}
if (!Number.isInteger(num)) return msg.reply("That is not a valid number.");
await this.client.commands.get("starsrequired").run(msg, [num]);
break;
}
case "channel": {
if (!value.length) return msg.reply("You must provide a channel to use this setting.");
const arg = await this.client.arguments.get("channelname").run(value[0], null, msg);
await this.client.commands.get("starboardchannel").run(msg, [arg]);
break;
}
default: {
await msg.reply("That setting is not a valid option, please select a valid setting to update.");
}
}
}
// --- CUSTOM COMMANDS SETTINGS ---
async customcommands(msg, [setting]) {
if (!setting) {
const prefix = msg.guild.settings.get("prefix") || "p!";
const embed = new MessageEmbed()
.setTitle("🛠️ Custom Commands - Settings")
.setDescription("**Tip:** You can make the custom commands highly advance and make them perform certain actions, replace text with tags, etc. [Learn More](https://blog.pengubot.com/guide-custom-commands/)")
.addField("Toggle Custom Commands", `\`\`\`${prefix}settings customcommands toggle\`\`\``)
.addField("Add Custom Command", `\`\`\`${prefix}createcmd <name> <message>\`\`\``)
.addField("Remove Custom Command", `\`\`\`${prefix}deletecmd <name>\`\`\``)
.addField("Update Existing Custom Command", `\`\`\`${prefix}updatecmd <name> <message>\`\`\``)
.addField("List Custom Commands", `\`\`\`${prefix}listcmds\`\`\``)
.setFooter("PenguBot.com")
.setTimestamp();
return msg.sendEmbed(embed);
}
setting = setting.toLowerCase();
switch (setting) {
case "toggle": {
await this.client.commands.get("togglecustomcmds").run(msg);
break;
}
default: {
await msg.reply("That setting is not a valid option, please select a valid setting to update.");
}
}
}
// --- WELCOME AND LEAVE MESSAGE SETTINGS ---
async greetings(msg, [setting, ...value]) {
if (!setting) {
const prefix = msg.guild.settings.get("prefix") || "p!";
const embed = new MessageEmbed()
.setTitle("💁 Welcome and Leave Messages - Settings")
.setDescription("**Tip:** You can use the following in your Welcome and Leave messages and they'll be replaced with the value automatically: `{mention}`, `{server}`, `{username}`, `{user.tag}`, `{user.id}` and `{members}`.")
.addField("Toggle Welcome Messages", `\`\`\`${prefix}settings greetings togglewelcome\`\`\``)
.addField("Toggle Leave Messages", `\`\`\`${prefix}settings greetings toggleleave\`\`\``)
.addField("Welcome Message", `\`\`\`${prefix}settings greetings welcomemsg <message>\`\`\``)
.addField("Leave Message", `\`\`\`${prefix}settings greetings leavemsg <message>\`\`\``)
.addField("Welcome Channel", `\`\`\`${prefix}settings greetings welcomechannel <channel>\`\`\``)
.addField("Leave Channel", `\`\`\`${prefix}settings greetings leavechannel <channel>\`\`\``)
.setFooter("PenguBot.com")
.setTimestamp();
return msg.sendEmbed(embed);
}
setting = setting.toLowerCase();
switch (setting) {
case "togglewelcome": {
await this.client.commands.get("togglewelcome").run(msg);
break;
}
case "toggleleave": {
await this.client.commands.get("toggleleave").run(msg);
break;
}
case "welcomemsg": {
await this.client.commands.get("setwelcomemsg").run(msg, [value.join(" ")]);
break;
}
case "leavemsg": {
await this.client.commands.get("setleavemsg").run(msg, [value.join(" ")]);
break;
}
case "welcomechannel": {
if (!value.length) return msg.reply("You must provide a channel to use this setting.");
const arg = await this.client.arguments.get("channelname").run(value[0], null, msg);
await this.client.commands.get("setwelcomechannel").run(msg, [arg]);
break;
}
case "leavechannel": {
if (!value.length) return msg.reply("You must provide a channel to use this setting.");
const arg = await this.client.arguments.get("channelname").run(value[0], null, msg);
await this.client.commands.get("setleavechannel").run(msg, [arg]);
break;
}
default: {
await msg.reply("That setting is not a valid option, please select a valid setting to update.");
}
}
}
};
================================================
FILE: src/commands/General/Chat Bot Info/stats.js
================================================
const { Command, Duration } = require("klasa");
const { MessageEmbed } = require("discord.js");
module.exports = class extends Command {
constructor(...args) {
super(...args, {
guarded: true,
aliases: ["status"],
description: language => language.get("COMMAND_STATS_DESCRIPTION")
});
}
async run(msg) {
let [users, guilds, channels, memory, vc, cpm, listeners] = [0, 0, 0, 0, 0, 0, 0];
const results = await this.client.shard.broadcastEval(`[this.guilds.cache.reduce((prev, val) => val.memberCount + prev, 0), this.guilds.cache.size, this.channels.cache.size, (process.memoryUsage().heapUsed / 1024 / 1024), this.music.filter(music => music.playing).size, this.health.commands.cmdCount[59].count, this.music.filter(music => music.playing).map(music => music.voiceChannel && music.voiceChannel.members.filter(mem => !mem.user.bot).size).reduce((prev, val) => prev + val, 0)]`).catch(() => null);
if (!results) return msg.reply("Oops! There appears to be a glitch in the matrix. Please try again later.");
for (const result of results) {
users += result[0];
guilds += result[1];
channels += result[2];
memory += result[3];
vc += result[4];
cpm += result[5];
listeners += result[6];
}
const shardID = msg.guild ? msg.guild.shardID + 1 : 1;
const embed = new MessageEmbed()
.setColor("RANDOM")
.setTimestamp()
.setThumbnail("https://i.imgur.com/HE0ZOSA.png")
.addField("❯ Memory Usage", `${memory.toFixed(2)} MB`, true)
.addField("❯ Uptime", Duration.toNow(Date.now() - (process.uptime() * 1000)), true)
.addField("❯ Users", users.toLocaleString(), true)
.addField("❯ Guilds", guilds.toLocaleString(), true)
.addField("❯ Channels", channels.toLocaleString(), true)
.addField("❯ Voice Streams", vc.toLocaleString(), true)
.addField("❯ Total Commands Ran", this.client.settings.get("counter.total").toLocaleString(), true)
.addField("❯ CPM", cpm, true)
.addField("❯ Listeners", listeners, true)
.addField("❯ Sharding", `**Cluster:** ${this.client.shard.id + 1} / ${this.client.shard.clusterCount} | **Shard:** ${shardID} / ${this.client.shard.shardCount}`, true)
.setAuthor("PenguBot - Statistics", this.client.user.displayAvatarURL(), "https://www.pengubot.com");
return msg.sendMessage({ embed });
}
};
================================================
FILE: src/commands/General/Chat Bot Info/support.js
================================================
const Command = require("../../../lib/structures/KlasaCommand");
module.exports = class extends Command {
constructor(...args) {
super(...args, {
guarded: true,
requiredPermissions: ["EMBED_LINKS"],
description: language => language.get("COMMAND_SUPPORT_DESCRIPTION")
});
}
async run(msg) {
return msg.send(msg.language.get("COMMAND_SUPPORT"));
}
};
================================================
FILE: src/commands/General/Chat Bot Info/upvote.js
================================================
const Command = require("../../../lib/structures/KlasaCommand");
const { MessageEmbed } = require("discord.js");
module.exports = class extends Command {
constructor(...args) {
super(...args, {
guarded: true,
requiredPermissions: ["EMBED_LINKS", "ATTACH_FILES"],
description: language => language.get("COMMAND_UPVOTE_DESCRIPTION")
});
}
async run(msg) {
const embed = new MessageEmbed()
.setDescription(msg.language.get("COMMAND_UPVOTE"))
.setAuthor("PenguBot - Upvote", this.client.user.displayAvatarURL(), "https://top.gg/bot/PenguBot/vote")
.setThumbnail("https://i.imgur.com/YxmvOHj.png")
.setColor("RANDOM");
return msg.sendEmbed(embed);
}
};
================================================
FILE: src/commands/Images/cat.js
================================================
const { Command, MessageEmbed } = require("../../index");
module.exports = class extends Command {
constructor(...args) {
super(...args, {
cooldown: 8,
aliases: ["cats", "catfact"],
requiredPermissions: ["ATTACH_FILES", "USE_EXTERNAL_EMOJIS", "EMBED_LINKS"],
description: language => language.get("COMMAND_CAT_DESCRIPTION"),
extendedHelp: "No extended help available."
});
}
async run(msg) {
const { fact } = await this.fetchURL("https://catfact.ninja/fact");
if (!fact) throw msg.language.get("ERR_TRY_AGAIN");
return msg.sendEmbed(new MessageEmbed()
.setFooter("© PenguBot.com")
.setTimestamp()
.setColor("RANDOM")
.setDescription(`**Cat Image & Fact**\n${fact}`)
.setImage(`http://thecatapi.com/api/images/get?format=src&type=jpg&size=med&${Date.now()}`));
}
};
================================================
FILE: src/commands/Images/cookie.js
================================================
const { Command, MessageEmbed } = require("../../index");
const cookies = ["http://i.imgur.com/SLwEY66.gif", "http://i.imgur.com/K6VoNp3.gif", "http://i.imgur.com/knVM6Lb.gif",
"http://i.imgur.com/P1BMly5.gif", "http://i.imgur.com/I8CrTUT.gif", "https://i.imgur.com/0XTueQR.png",
"https://i.imgur.com/u9k8x4J.png", "https://i.imgur.com/AUtfHnK.png", "https://i.imgur.com/XjTbrKc.png",
"https://i.imgur.com/A3mgqEh.png", "https://i.imgur.com/YnkdGZd.png", "https://i.imgur.com/FJsOnOE.png",
"https://i.imgur.com/RQFPwDg.png", "https://i.imgur.com/vyCTGr0.png", "https://i.imgur.com/kkXToc8.png",
"https://i.imgur.com/ctHwqVL.png", "https://i.imgur.com/yUaCPvC.png", "https://i.imgur.com/IUM6Z8F.png"
];
module.exports = class extends Command {
constructor(...args) {
super(...args, {
cooldown: 8,
aliases: ["sendcookie"],
description: language => language.get("COMMAND_COOKIE_DESCRIPTION"),
extendedHelp: "No extended help available.",
usage: "<user:user>"
});
}
async run(msg, [user]) {
const embed = new MessageEmbed()
.setFooter("© PenguBot.com")
.setTimestamp()
.setImage(cookies[Math.floor(Math.random() * cookies.length)])
.setColor("RANDOM");
return msg.sendMessage(`***<@${user.id}>, ${msg.language.get("CMD_FUN_COOKIE")} ${msg.author}!***`, { embed: embed });
}
};
================================================
FILE: src/commands/Images/cuddle.js
================================================
const { Command, MessageEmbed } = require("../../index");
module.exports = class extends Command {
constructor(...args) {
super(...args, {
cooldown: 8,
aliases: ["sendcuddle"],
requiredPermissions: ["ATTACH_FILES", "EMBED_LINKS"],
description: language => language.get("COMMAND_CUDDLE_DESCRIPTION"),
extendedHelp: "No extended help available.",
usage: "<user:username>"
});
}
async run(msg, [user]) {
const { url } = await this.fetchURL("https://nekos.life/api/v2/img/cuddle");
if (!url) throw msg.language.get("ERR_TRY_AGAIN");
const embed = new MessageEmbed()
.setFooter("© PenguBot.com")
.setTimestamp()
.setImage(url)
.setColor("RANDOM");
return msg.sendMessage(`🤗 | ***${user}, ${msg.language.get("CMD_FUN_CUDDLE")} ${msg.author}!***`, { embed });
}
};
================================================
FILE: src/commands/Images/dog.js
================================================
const { Command, MessageEmbed } = require("../../index");
module.exports = class extends Command {
constructor(...args) {
super(...args, {
cooldown: 8,
aliases: ["doggos", "dogpic"],
requiredPermissions: ["ATTACH_FILES", "USE_EXTERNAL_EMOJIS", "EMBED_LINKS"],
description: language => language.get("COMMAND_DOG_DESCRIPTION"),
extendedHelp: "No extended help available."
});
}
async run(msg) {
const data = await this.fetchURL("http://shibe.online/api/shibes?count=1&urls=true&httpsUrls=false");
if (!data || !data.length) throw msg.language.get("ERR_TRY_AGAIN");
return msg.sendEmbed(new MessageEmbed()
.setFooter("© PenguBot.com")
.setTimestamp()
.setColor("RANDOM")
.setDescription(`**Dog Picture**`)
.setImage(data[0]));
}
};
================================================
FILE: src/commands/Images/feed.js
================================================
const { Command, MessageEmbed } = require("../../index");
module.exports = class extends Command {
constructor(...args) {
super(...args, {
cooldown: 8,
aliases: ["sendfood"],
requiredPermissions: ["ATTACH_FILES", "EMBED_LINKS"],
description: language => language.get("COMMAND_FEED_DESCRIPTION"),
extendedHelp: "No extended help available.",
usage: "<user:username>"
});
}
async run(msg, [user]) {
const { url } = await this.fetchURL("https://nekos.life/api/v2/img/feed");
if (!url) throw msg.language.get("ERR_TRY_AGAIN");
const embed = new MessageEmbed()
.setFooter("© PenguBot.com")
.setTimestamp()
.setImage(url)
.setColor("RANDOM");
return msg.sendMessage(`🥘 | ***${user}, ${msg.language.get("CMD_FUN_FED")} ${msg.author}!***`, { embed });
}
};
================================================
FILE: src/commands/Images/fox.js
================================================
const { Command, MessageEmbed } = require("../../index");
module.exports = class extends Command {
constructor(...args) {
super(...args, {
cooldown: 8,
aliases: ["foxy", "foxes"],
requiredPermissions: ["ATTACH_FILES", "USE_EXTERNAL_EMOJIS", "EMBED_LINKS"],
description: language => language.get("COMMAND_FOX_DESCRIPTION"),
extendedHelp: "No extended help available."
});
}
async run(msg) {
const { image } = await this.fetchURL("https://randomfox.ca/floof/");
if (!image) throw msg.language.get("ERR_TRY_AGAIN");
return msg.sendEmbed(new MessageEmbed()
.setFooter("© PenguBot.com")
.setTimestamp()
.setColor("RANDOM")
.setDescription(`**Fox Picture**`)
.setImage(image));
}
};
================================================
FILE: src/commands/Images/hug.js
================================================
const { Command, MessageEmbed } = require("../../index");
module.exports = class extends Command {
constructor(...args) {
super(...args, {
cooldown: 8,
aliases: ["sendhug"],
requiredPermissions: ["ATTACH_FILES", "EMBED_LINKS"],
description: language => language.get("COMMAND_HUG_DESCRIPTION"),
extendedHelp: "No extended help available.",
usage: "<user:username>"
});
}
async run(msg, [user]) {
const { url } = await this.fetchURL("https://nekos.life/api/v2/img/hug");
if (!url) throw msg.language.get("ERR_TRY_AGAIN");
const embed = new MessageEmbed()
.setFooter("© PenguBot.com")
.setTimestamp()
.setImage(url)
.setColor("RANDOM");
return msg.sendMessage(`🤗 | ***${user}, ${msg.language.get("CMD_FUN_HUG")} ${msg.author}!***`, { embed });
}
};
================================================
FILE: src/commands/Images/kiss.js
================================================
const { Command, MessageEmbed } = require("../../index");
module.exports = class extends Command {
constructor(...args) {
super(...args, {
cooldown: 8,
aliases: ["sendkiss"],
requiredPermissions: ["ATTACH_FILES", "EMBED_LINKS"],
description: language => language.get("COMMAND_KISS_DESCRIPTION"),
extendedHelp: "No extended help available.",
usage: "<user:username>"
});
}
async run(msg, [user]) {
const { url } = await this.fetchURL("https://nekos.life/api/v2/img/kiss");
if (!url) throw msg.language.get("ERR_TRY_AGAIN");
const embed = new MessageEmbed()
.setFooter("© PenguBot.com")
.setTimestamp()
.setImage(url)
.setColor("RANDOM");
return msg.sendMessage(`💋 | ***${user}, ${msg.language.get("CMD_FUN_KISS")} ${msg.author}!***`, { embed });
}
};
================================================
FILE: src/commands/Images/meme.js
================================================
const { Command } = require("../../index");
const subReddits = ["AdviceAnimals", "MemeEconomy", "ComedyCemetery", "memes", "dankmemes", "PrequelMemes", "terriblefacebookmemes", "PewdiepieSubmissions", "funny", "wholesomememes", "fffffffuuuuuuuuuuuu", "BikiniBottomTwitter", "2meirl4meirl", "DeepFriedMemes", "surrealmemes", "firstworldanarchists"];
module.exports = class extends Command {
constructor(...args) {
super(...args, {
cooldown: 5,
aliases: ["memes", "randommeme"],
requiredPermissions: ["ATTACH_FILES", "EMBED_LINKS"],
description: language => language.get("COMMAND_MEME_DESCRIPTION"),
extendedHelp: "No extended help available."
});
}
async run(msg) {
const subReddit = subReddits[Math.floor(Math.random() * subReddits.length)];
const data = await this.client.funcs.scrapeSubreddit(subReddit, { type: "hot" });
if (data.over_18 && !msg.channel.nsfw) return msg.sendMessage(`${this.client.emotes.cross} ***This channel is not NSFW so I can't send it here...***`);
return msg.channel.send(data.url);
}
};
================================================
FILE: src/commands/Images/pat.js
================================================
const { Command, MessageEmbed } = require("../../index");
module.exports = class extends Command {
constructor(...args) {
super(...args, {
cooldown: 8,
aliases: ["sendpat"],
requiredPermissions: ["ATTACH_FILES", "EMBED_LINKS"],
description: language => language.get("COMMAND_PAT_DESCRIPTION"),
extendedHelp: "No extended help available.",
usage: "<user:username>"
});
}
async run(msg, [user]) {
const { url } = await this.fetchURL("https://nekos.life/api/v2/img/pat");
if (!url) throw msg.language.get("ERR_TRY_AGAIN");
const embed = new MessageEmbed()
.setFooter("© PenguBot.com")
.setTimestamp()
.setImage(url)
.setColor("RANDOM");
return msg.sendMessage(`✋ | ***${user}, ${msg.language.get("CMD_FUN_PAT")} ${msg.author}!***`, { embed });
}
};
================================================
FILE: src/commands/Images/pengu.js
================================================
const Command = require("../../lib/structures/KlasaCommand");
const { MessageEmbed } = require("discord.js");
const pics = ["http://i.imgur.com/Urfp335.png",
"http://i.imgur.com/gC8v9fp.jpg", "http://i.imgur.com/DZ6YtvT.jpg", "http://i.imgur.com/LdWARAL.jpg",
"http://i.imgur.com/7uF0u9Q.jpg", "http://i.imgur.com/0vgVnpr.png", "http://i.imgur.com/1GKlyH2.png",
"http://i.imgur.com/jlzSELQ.png", "https://i.imgur.com/Vm98hJq.png", "https://i.imgur.com/RF4JeC8.png",
"https://i.imgur.com/Co26qmr.png", "https://i.imgur.com/ixSGy7V.jpg", "https://i.imgur.com/WzsIIzN.png",
"https://i.imgur.com/v8oxfHW.jpg", "https://i.imgur.com/RPxPRXV.png", "https://i.imgur.com/UVnwRMk.gif",
"https://i.imgur.com/vfKwurE.gif", "https://i.imgur.com/XKukgBG.gif", "https://i.imgur.com/KohkQvr.gif",
"https://i.imgur.com/uwdMmng.gif", "https://i.imgur.com/EOln62Q.gif", "https://i.imgur.com/8fcKsh1.gif"
];
module.exports = class extends Command {
constructor(...args) {
super(...args, {
cooldown: 8,
aliases: ["pingu", "penguin"],
requiredPermissions: ["ATTACH_FILES", "USE_EXTERNAL_EMOJIS", "EMBED_LINKS"],
description: language => language.get("COMMAND_PENGU_DESCRIPTION"),
extendedHelp: "No extended help available."
});
}
async run(msg) {
const embed = new MessageEmbed()
.setFooter("© PenguBot.com")
.setTimestamp()
.setImage(pics[Math.floor(Math.random() * pics.length)])
.setColor("RANDOM");
return msg.sendMessage(`<:pengu:383632112323919872> | ***${msg.author}, ${msg.language.get("CMD_FUN_PENGU")}!***`, { embed: embed });
}
};
================================================
FILE: src/commands/Images/poke.js
================================================
const { Command, MessageEmbed } = require("../../index");
module.exports = class extends Command {
constructor(...args) {
super(...args, {
cooldown: 8,
aliases: ["sendpoke"],
requiredPermissions: ["ATTACH_FILES", "EMBED_LINKS"],
description: language => language.get("COMMAND_POKE_DESCRIPTION"),
extendedHelp: "No extended help available.",
usage: "<user:username>"
});
}
async run(msg, [user]) {
const { url } = await this.fetchURL("https://nekos.life/api/v2/img/poke");
if (!url) throw msg.language.get("ERR_TRY_AGAIN");
const embed = new MessageEmbed()
.setFooter("© PenguBot.com")
.setTimestamp()
.setImage(url)
.setColor("RANDOM");
return msg.sendMessage(`👈 | ***${user}, ${msg.language.get("CMD_FUN_POKE")} ${msg.author}!***`, { embed });
}
};
================================================
FILE: src/commands/Images/punch.js
================================================
const Command = require("../../lib/structures/KlasaCommand");
const { MessageEmbed } = require("discord.js");
const punches = ["http://i.imgur.com/aGPHQ3E.gif", "http://i.imgur.com/FxFfdOZ.gif", "http://i.imgur.com/XA7PPiy.gif",
"http://i.imgur.com/5hcVtGf.gif", "http://i.imgur.com/nwGsg12.gif", "http://i.imgur.com/GZX1COH.gif",
"https://i.imgur.com/UcycckQ.gif", "https://i.imgur.com/VmdBxgq.gif", "https://i.imgur.com/IputsOi.gif",
"https://i.imgur.com/UY3sTpj.gif", "https://i.imgur.com/VdwTwRo.gif", "https://i.imgur.com/VIKEo7q.gif",
"https://i.imgur.com/XPq1P4F.gif", "https://i.imgur.com/X0uIstL.gif", "https://i.imgur.com/Of2BTLu.gif",
"https://i.imgur.com/tSjlgKs.gif", "https://i.imgur.com/hEDcADi.gif"
];
module.exports = class extends Command {
constructor(...args) {
super(...args, {
cooldown: 8,
aliases: ["sendpunch"],
requiredPermissions: ["ATTACH_FILES", "EMBED_LINKS"],
description: language => language.get("COMMAND_PUNCH_DESCRIPTION"),
extendedHelp: "No extended help available.",
usage: "<user:username>"
});
}
async run(msg, [user]) {
const embed = new MessageEmbed()
.setFooter("© PenguBot.com")
.setTimestamp()
.setImage(punches[Math.floor(Math.random() * punches.length)])
.setColor("RANDOM");
return msg.sendMessage(`👊 | ***${user}, ${msg.language.get("CMD_FUN_PUNCH")} ${msg.author}!***`, { embed: embed });
}
};
================================================
FILE: src/commands/Images/randomcomic.js
================================================
const { Command, MessageEmbed } = require("../../index");
const { parse } = require("node-html-parser");
module.exports = class extends Command {
constructor(...args) {
super(...args, {
cooldown: 8,
aliases: ["comic", "comics"],
requiredPermissions: ["ATTACH_FILES", "EMBED_LINKS"],
description: language => language.get("COMMAND_COMIC_DESCRIPTION"),
extendedHelp: "No extended help available."
});
}
async run(msg) {
const res = await this.fetchURL(`https://c.xkcd.com/random/comic/`, { type: "text" })
.catch(() => null);
if (!res) throw `${this.client.emotes.cross} ***${msg.language.get("ER_CATS_DOGS")}***`;
const root = parse(res);
const img = root.querySelector("#comic").querySelector("img").getAttribute("src");
console.log(img);
return msg.sendEmbed(new MessageEmbed()
.setFooter("© PenguBot.com - Comic by xkcd.com")
.setTimestamp()
.setColor("RANDOM")
.setImage(`https:${img}`));
}
};
================================================
FILE: src/commands/Images/slap.js
================================================
const { Command, MessageEmbed } = require("../../index");
module.exports = class extends Command {
constructor(...args) {
super(...args, {
cooldown: 8,
aliases: ["sendslap"],
requiredPermissions: ["ATTACH_FILES", "EMBED_LINKS"],
description: language => language.get("COMMAND_SLAP_DESCRIPTION"),
extendedHelp: "No extended help available.",
usage: "<user:username>"
});
}
async run(msg, [user]) {
const { url } = await this.fetchURL("https://nekos.life/api/v2/img/slap");
if (!url) throw msg.language.get("ERR_TRY_AGAIN");
const embed = new MessageEmbed()
.setFooter("© PenguBot.com")
.setTimestamp()
.setImage(url)
.setColor("RANDOM");
return msg.sendMessage(`🖐 | ***${user}, ${msg.language.get("CMD_FUN_SLAP")} ${msg.author}!***`, { embed });
}
};
================================================
FILE: src/commands/Images/tickle.js
================================================
const { Command, MessageEmbed } = require("../../index");
module.exports = class extends Command {
constructor(...args) {
super(...args, {
cooldown: 8,
aliases: ["sendtickle"],
requiredPermissions: ["ATTACH_FILES", "EMBED_LINKS"],
description: language => language.get("COMMAND_TICKLE_DESCRIPTION"),
extendedHelp: "No extended help available.",
usage: "<user:username>"
});
}
async run(msg, [user]) {
const { url } = await this.fetchURL("https://nekos.life/api/v2/img/tickle");
if (!url) throw msg.language.get("ERR_TRY_AGAIN");
const embed = new MessageEmbed()
.setFooter("© PenguBot.com")
.setTimestamp()
.setImage(url)
.setColor("RANDOM");
return msg.sendMessage(`🤣 | ***${user}, ${msg.language.get("CMD_FUN_TICKLE")} ${msg.author}!***`, { embed });
}
};
================================================
FILE: src/commands/Images/wholesome.js
================================================
const { Command } = require("../../index");
const SUB_REDDITS = ["wholesome", "aww", "AnimalsBeingBros"];
module.exports = class extends Command {
constructor(...args) {
super(...args, {
cooldown: 10,
bucket: 2,
aliases: ["wholesome", "aww"],
requiredPermissions: ["EMBED_LINKS"],
description: language => language.get("COMMAND_WHOLESOME_DESCRIPTION"),
extendedHelp: "No extended help available."
});
}
async run(msg) {
const subReddit = SUB_REDDITS[Math.floor(Math.random() * SUB_REDDITS.length)];
const data = await this.client.funcs.scrapeSubreddit(subReddit, { type: "top" });
return msg.channel.send(data.url);
}
};
================================================
FILE: src/commands/Jokes and Stuff/chucknorris.js
================================================
const { Command, MessageEmbed } = require("../../index");
module.exports = class extends Command {
constructor(...args) {
super(...args, {
cooldown: 8,
requiredPermissions: ["ATTACH_FILES", "USE_EXTERNAL_EMOJIS", "EMBED_LINKS"],
description: language => language.get("COMMAND_CHUCK_DESCRIPTION"),
extendedHelp: "No extended help available."
});
}
async run(msg) {
const { value } = await this.fetchURL("http://api.chucknorris.io/jokes/random");
return msg.sendEmbed(new MessageEmbed()
.setColor("RANDOM")
.setDescription(`**Chuck Norris Joke**\n\n${value}`)
.setThumbnail("https://i.imgur.com/3wIvF42.png"));
}
};
================================================
FILE: src/commands/Jokes and Stuff/compliment.js
================================================
const Command = require("../../lib/structures/KlasaCommand");
const Compliments = [
"You're my kind of weird.", "I love you more than tea.", "You're a Michelin Star human.",
"You're a chocolate Hobnob in a jar of Rich Teas.", "You've really nailed being a human. Good job.",
"You are wonderfully odd.", "You are the last minute goal in the cup final.",
"You're tougher than my wifi password.", "You are a walking high-five.", "You’d win the Saturday Kitchen omelette challenge.",
"You could be a part-time model.", "I like your face.", "You're wise and all knowing, like a mighty owl.",
"You're an awesome friend.", "You're a gift to those around you.", "You're a smart cookie.", "You are awesome!",
"You have impeccable manners.", "I like your style.", "You have the best laugh.", "I appreciate you.",
"You are the most perfect you there is.", "You are enough.", "You're strong.", "Your perspective is refreshing.",
"I'm grateful to know you.", "You light up the room.", "You deserve a hug right now.", "You should be proud of yourself.",
"You're more helpful than you realize.", "You have a great sense of humor.", "You've got an awesome sense of humor!",
"You are really courageous.", "Your kindness is a balm to all who encounter it.", "You're all that and a super-size bag of chips.",
"On a scale from 1 to 10, you're an 11.", "You are strong.", "You're even more beautiful on the inside than you are on the outside.",
"You have the courage of your convictions.", "I'm inspired by you.", "You're like a ray of sunshine on a really dreary day.",
"You are making a difference.", "Thank you for being there for me.", "You bring out the best in other people."
];
module.exports = class extends Command {
constructor(...args) {
super(...args, {
cooldown: 8,
description: language => language.get("COMMAND_COMPLIMENT_DESCRIPTION"),
extendedHelp: "No extended help available.",
usage: "<user:username>"
});
}
async run(msg, [user]) {
return msg.sendMessage(`${user}, ***you know what? ${Compliments[Math.floor(Math.random() * Compliments.length)]}***`);
}
};
================================================
FILE: src/commands/Jokes and Stuff/dadjoke.js
================================================
const { Command, MessageEmbed } = require("../../index");
module.exports = class extends Command {
constructor(...args) {
super(...args, {
cooldown: 8,
aliases: ["joke"],
requiredPermissions: ["ATTACH_FILES", "EMBED_LINKS"],
description: language => language.get("COMMAND_DADJOKE_DESCRIPTION"),
extendedHelp: "No extended help available."
});
}
async run(msg) {
const { joke } = await this.fetchURL("https://icanhazdadjoke.com/", { headers: { Accept: "application/json" } });
return msg.sendEmbed(new MessageEmbed()
.setDescription(`**Dad Joke Alert**\n\n${joke.length < 1900 ? joke : `${joke.substring(0, 1900)}...`}`)
.setThumbnail("https://i.imgur.com/IxosIBh.png")
.setColor("RANDOM"));
}
};
================================================
FILE: src/commands/Jokes and Stuff/dice.js
================================================
const Command = require("../../lib/structures/KlasaCommand");
module.exports = class extends Command {
constructor(...args) {
super(...args, {
cooldown: 8,
aliases: ["die", "roll"],
description: language => language.get("COMMAND_DICE_DESCRIPTION"),
extendedHelp: "No extended help available.",
usage: "[sides:integer]"
});
}
async run(msg, [sides = 6]) {
const num = Math.floor(Math.random() * sides) + 1;
return msg.reply(`I rolled you a 🎲 of **${sides}** side(s) and got **${num}** as the outcome.`);
}
};
================================================
FILE: src/commands/Jokes and Stuff/fml.js
================================================
const { Command, MessageEmbed } = require("../../index");
const { parse } = require("node-html-parser");
module.exports = class extends Command {
constructor(...args) {
super(...args, {
cooldown: 8,
aliases: ["fuckmylife"],
requiredPermissions: ["ATTACH_FILES", "EMBED_LINKS"],
description: language => language.get("COMMAND_FML_DESCRIPTION"),
extendedHelp: "No extended help available."
});
}
async run(msg) {
const res = await this.fetchURL("http://www.fmylife.com/random", { type: "text" })
.catch(() => null);
if (!res) throw `${this.client.emotes.cross} ***${msg.language.get("ER_CATS_DOGS")}***`;
const root = parse(res);
const article = root.querySelector(".article-link").text;
return msg.sendEmbed(new MessageEmbed()
.setDescription(`**F*ck My Life**\n${article}`)
.setThumbnail("https://i.imgur.com/XW16vXq.png")
.setColor("RANDOM"));
}
};
================================================
FILE: src/commands/Jokes and Stuff/insult.js
================================================
const Command = require("../../lib/structures/KlasaCommand");
const start = ["a lazy", "a stupid", "an insecure", "an idiotic", "a slimy", "a slutty", "a smelly", "a pompous", "a communist", "a dicknose", "a pie-eating", "a racist", "an elitist", "a white trash", "a drug-loving", "a butterface", "a tone deaf", "a ugly", "a creepy", "an artless", "a bawdy", "a beslubbering", "a bootless", "a churlish", "a cockered", "a clouted", "a craven", "a currish", "a dankish", "a dissembling", "a droning", "an errant", "a fawning", "a fobbing", "a frothy", "a gleeking", "a goatfish", "a gorbellied", "an impertinent", "an infectious", "a jarring", "a loggerheaded", "a lumpish", "a mammering", "a mangled", "a mewling", "a paunchy", "a pribbling", "a puking", "a puny", "a qualling", "a rank", "a reeky", "a roguish", "a ruttish", "a saucy", "a spleeny", "a spongy", "a surly", "a tottering", "an unmuzzled", "a vain", "a venomed", "a villainous", "a warped", "a wayward", "a weedy", "a yeasty", "a lilly-livered", "a rotten", "a stinky", "a lame", "a dim-witted", "a funky", "a crusty", "a steamy", "a drizzly", "a grizzly", "a squirty", "an uptight", "a hairy", "a husky", "an arrogant", "a nippy", "a chunky", "a smelly", "a drooling", "a crusty", "a decrepic", "a stupid", "a moronic", "a greasy", "a poxy", "an ugly", "a smelly", "a putrid", "a shitty", "an assinine", "a sickening"]; // eslint-disable-line
const middle = ["douche", "ass", "turd", "rectum", "butt", "shit", "crotch", "turd", "prick", "taint", "boner", "shart", "nut", "sphincter", "base-court", "bat-fowling", "beef-witted", "beetle-headed", "boil-brained", "clapper-clawed", "clay-brained", "common-kissing", "crook-pated", "dismal-dreaming", "dizzy-eyed", "doghearted", "dread-bolted", "earth-vexing", "elf-skinned", "fat-kidneyed", "fen-sucked", "flap-mouthed", "fly-bitten", "folly-fallen", "fool-born", "full-gorged", "guts-gripping", "half-faced", "hasty-witted", "hedge-born", "hell-hated", "idle-headed", "ill-breeding", "ill-nurtured", "knotty-pated", "milk-livered", "motly-minded", "onion-eyed", "plume-plucked", "pottle-deep", "pox-marked", "reeling-ripe", "rough-hewn", "rude-growing", "rump-red", "shard-borne", "sheep-biting", "spur-galled", "swag-bellied", "tardy-gaited", "tickle-brained", "toad-spotted", "unchin-snouted", "weather-bitten", "hiney", "poop", "toot", "wedgie", "stool", "fudge", "bum", "potty", "dookie", "pudding", "sphincter", "booger", "feces", "snot", "crust", "badonk-a", "crud", "sludge", "tool", "shit-kicking", "monkey-licking", "crotch-sniffing", "donkey-spanking", "fashion-illiterate", "worm-ridden", "lathered-up", "pasty-waisted", "snot-flicking", "fart-eating"]; // eslint-disable-line
const end = ["pilot", "canoe", "captain", "pirate", "hammer", "knob", "box", "jockey", "nazi", "waffle", "goblin", "blossom", "biscuit", "clown", "socket", "monster", "hound", "dragon", "balloon", "apple-john", "baggage", "barnacle", "bladder", "boar-pig", "bugbear", "bum-bailey", "canker-blossom", "clack-dish", "clotpole", "coxcomb", "codpiece", "death-token", "dewberry", "flap-dragon", "flax-wench", "flirt-gill", "foot-licker", "fustilarian", "giglet", "gudgeon", "haggard", "harpy", "hedge-pig", "horn-beast", "hugger-mugger", "joithead", "lewdster", "lout", "maggot-pie", "malt-worm", "mammet", "measle", "minnow", "miscreant", "moldwarp", "mumble-news", "nut-hook", "pigeon-egg", "pignut", "puttock", "pumpion", "ratsbane", "scut", "skinsmate", "strumpet", "varlot", "vassal", "whey-face", "wagtail", "squeegee", "turtle", "cabbage", "bomb", "sniffer", "binkie", "stump", "nugget", "whistle", "twig", "knuckle", "burger", "hotdog", "loaf", "freckle", "soldier", "kernal", "shingle", "warrior", "hemorrhoid", "fuckface", "asshole", "scumbucket", "toerag", "hackwack", "imbecile", "stunodigan", "maggot", "hipster", "gargabe", "jerkstore"]; // eslint-disable-line
module.exports = class extends Command {
constructor(...args) {
super(...args, {
cooldown: 8,
aliases: ["die", "roll"],
description: language => language.get("COMMAND_INSULT_DESCRIPTION"),
extendedHelp: "No extended help available.",
usage: "<user:username>"
});
}
async run(msg, [user]) {
return msg.sendMessage(`${user}, ***you know what? you're nothing but ${start[Math.floor(Math.random() * start.length)]} ${middle[Math.floor(Math.random() * middle.length)]} ${end[Math.floor(Math.random() * end.length)]}.***`);
}
};
================================================
FILE: src/commands/Jokes and Stuff/randomfact.js
================================================
const { Command, MessageEmbed } = require("../../index");
const facts = require("../../lib/constants/facts.json");
module.exports = class extends Command {
constructor(...args) {
super(...args, {
cooldown: 8,
aliases: ["fact", "rfact"],
requiredPermissions: ["ATTACH_FILES", "EMBED_LINKS"],
description: language => language.get("COMMAND_FACT_DESCRIPTION"),
extendedHelp: "No extended help available."
});
}
async run(msg) {
return msg.sendEmbed(new MessageEmbed()
.setDescription(`**Random Fact**\n\n${facts[Math.floor(Math.random() * facts.length)]}`)
.setThumbnail("https://i.imgur.com/fJiD9Jo.png")
.setColor("RANDOM"));
}
};
================================================
FILE: src/commands/Jokes and Stuff/trump.js
================================================
const { Command, MessageEmbed } = require("../../index");
module.exports = class extends Command {
constructor(...args) {
super(...args, {
cooldown: 8,
aliases: ["trumpjoke", "trumpinsult"],
requiredPermissions: ["ATTACH_FILES", "EMBED_LINKS"],
description: language => language.get("COMMAND_TRUMP_DESCRIPTION"),
extendedHelp: "No extended help available.",
usage: "[user:username]"
});
}
async run(msg, [user = msg.author]) {
const data = await this.fetchURL(`https://api.whatdoestrumpthink.com/api/v1/quotes/personalized`, { query: { q: user.username } });
if (!data.message) throw msg.language.get("ER_TRY_AGAIN");
return msg.sendEmbed(new MessageEmbed()
.setDescription(`**Get Trumped**\n\n${data.message}`)
.setThumbnail("https://i.imgur.com/lGJbGy6.png")
.setColor("RANDOM"));
}
};
================================================
FILE: src/commands/Jokes and Stuff/yomomma.js
================================================
const { Command, MessageEmbed } = require("../../index");
const data = require("../../lib/constants/yomomma");
module.exports = class extends Command {
constructor(...args) {
super(...args, {
cooldown: 8,
aliases: ["yomoma", "yomommafat", "yomommasofat"],
requiredPermissions: ["ATTACH_FILES", "EMBED_LINKS"],
description: language => language.get("COMMAND_MOMMA_DESCRIPTION"),
extendedHelp: "No extended help available."
});
}
async run(msg) {
const joke = data[Math.floor(Math.random() * data.length)];
return msg.sendEmbed(new MessageEmbed()
.setDescription(`**Yo Momma Joke**\n\n${joke}`)
.setThumbnail("https://i.imgur.com/ordRh9e.png")
.setColor("RANDOM"));
}
};
================================================
FILE: src/commands/Management/Automod/manageautomod.js
================================================
const { Command } = require("../../../index");
module.exports = class extends Command {
constructor(...args) {
super(...args, {
runIn: ["text"],
cooldown: 10,
aliases: ["automod", "automodfilters", "toggleautomod"],
permissionLevel: 6,
requiredPermissions: ["USE_EXTERNAL_EMOJIS"],
subcommands: true,
description: language => language.get("COMMAND_AUTOMOD_DESCRPTION"),
usage: "<toggle|threshold> [filter:string] [threshold:float]",
usageDelim: " "
});
}
async toggle(msg, [filter]) {
if (!filter) {
const mode = !msg.guild.settings.get("toggles.perspective");
await msg.guild.settings.update("toggles.perspective", mode);
return msg.sendMessage(`${mode ? this.client.emotes.check : this.client.emotes.cross} ***${mode ? msg.language.get("MESSAGE_AUTOMOD_ENABLED") : msg.language.get("MESSAGE_AUTOMOD_DISABLED")}***`);
} else {
filter = filter.toUpperCase();
const perspective = msg.guild.settings.get("automod.perspective");
const keys = [...perspective.keys()];
if (!keys.includes(filter)) return msg.sendMessage(`${this.client.emotes.cross} ***That is an Invalid Filter, please choose from \`${keys.join("`, `")}\`.***`);
const obj = perspective.get(filter);
obj.enabled = !obj.enabled;
const { errors } = await msg.guild.settings.update(`automod.perspective.${filter}`, obj, { action: "overwrite" });
if (errors) return msg.sendMessage(`${this.client.emotes.cross} ***There was an error:*** ${errors[0]}`);
return msg.sendMessage(`${obj.enabled ? this.client.emotes.check : this.client.emotes.cross} \`${filter}\` ***${msg.language.get("MESSAGE_AUTOMOD_TOGGLED")}.***`);
}
}
async threshold(msg, [filter, threshold]) {
if (!filter || !threshold) return msg.sendMessage(`${this.client.emotes.cross} ***Filter or Threshold are required arguments.***`);
filter = filter.toUpperCase();
const perspective = msg.guild.settings.get("automod.perspective");
const perspectiveObj = Object.fromEntries(perspective);
if (!perspectiveObj[filter]) return msg.sendMessage(`${this.client.emotes.cross} ***That is an Invalid Filter, please choose from \`${Object.keys(perspectiveObj).join("`, `")}\`.***`);
if (threshold && (threshold > 1 || threshold <= 0)) return msg.sendMessage(`${this.client.emotes.cross} ***Threshold can't be more than 1 or less than 0. i.e. 0.93***`);
const obj = perspectiveObj[filter];
obj.threshold = threshold;
const { errors } = await msg.guild.settings.update(`automod.perspective.${filter}`, obj, { action: "overwrite" });
if (errors) return msg.sendMessage(`${this.client.emotes.cross} ***There was an error:*** ${errors[0]}`);
return msg.sendMessage(`${this.client.emotes.check} \`${filter}\` ***${msg.language.get("MESSAGE_AUTOMOD_TOGGLED")} with \`${threshold}\` threshold.***`);
}
};
================================================
FILE: src/commands/Management/Automod/toggleinvites.js
================================================
const Command = require("../../../lib/structures/KlasaCommand");
module.exports = class extends Command {
constructor(...args) {
super(...args, {
runIn: ["text"],
cooldown: 10,
aliases: ["adblock", "antiinvites"],
permissionLevel: 6,
requiredPermissions: ["USE_EXTERNAL_EMOJIS"],
description: language => language.get("COMMAND_ADBLOCK_DESCRIPTION"),
quotedStringSupport: false,
extendedHelp: "No extended help available."
});
}
async run(msg) {
const toggle = !msg.guild.settings.get("automod.invites");
await msg.guild.settings.update("automod.invites", toggle);
return msg.sendMessage(`${toggle ? this.client.emotes.check : this.client.emotes.cross} ***Anti-invites have been ${toggle ? "Enabled" : "Disabled"}***`);
}
};
================================================
FILE: src/commands/Management/Autoroles/addautoroles.js
================================================
const { Command } = require("../../../index");
module.exports = class extends Command {
constructor(...args) {
super(...args, {
runIn: ["text"],
cooldown: 10,
aliases: ["addautorole", "removeautorole", "removeautoroles", "deleteautorole", "deleteautoroles"],
permissionLevel: 6,
requiredPermissions: ["USE_EXTERNAL_EMOJIS"],
usage: "<role:rolename>",
description: language => language.get("COMMAND_ADD_ROLES_DESCRPTION"),
extendedHelp: "No extended help available."
});
}
async run(msg, [role]) {
if (msg.guild.settings.get("roles.autorole").indexOf(role.id) !== -1) {
return msg.guild.settings.update("roles.autorole", role, msg.guild).then(() => {
msg.sendMessage(`${this.client.emotes.cross} ***${role.name} ${msg.language.get("MESSAGE_AUTOROLE_REMOVED")}***`);
});
} else {
return msg.guild.settings.update("roles.autorole", role, msg.guild).then(() => {
msg.sendMessage(`${this.client.emotes.check} ***${role.name} ${msg.language.get("MESSAGE_AUTOROLE_ADDED")}***`);
});
}
}
};
================================================
FILE: src/commands/Management/Autoroles/toggleautoroles.js
================================================
const { Command } = require("../../../index");
module.exports = class extends Command {
constructor(...args) {
super(...args, {
runIn: ["text"],
cooldown: 10,
aliases: ["toggleautorole", "enableautoroles", "disableautoroles"],
permissionLevel: 6,
requiredPermissions: ["USE_EXTERNAL_EMOJIS"],
description: language => language.get("COMMAND_TOGGLE_ROLES_DESCRPTION"),
extendedHelp: "No extended help available."
});
}
async run(msg) {
const toggle = !msg.guild.settings.get("toggles.autoroles");
await msg.guild.settings.update("toggles.autoroles", toggle);
return msg.sendMessage(`${toggle ? this.client.emotes.check : this.client.emotes.cross} ***${toggle ? msg.language.get("MESSAGE_AUTOROLES_ENABLED") : msg.language.get("MESSAGE_AUTOROLES_DISABLED")}`);
}
};
================================================
FILE: src/commands/Management/Custom Commands/createcmd.js
================================================
const { Command } = require("../../../index");
module.exports = class extends Command {
constructor(...args) {
super(...args, {
runIn: ["text"],
cooldown: 10,
aliases: ["addcmd"],
permissionLevel: 6,
requiredPermissions: ["USE_EXTERNAL_EMOJIS"],
description: language => language.get("COMMAND_ADD_CMD_DESCRIPTION"),
usage: "<name:string> <content:string> [...]",
usageDelim: " ",
extendedHelp: "More Information can be Found Here: https://bit.ly/PenguCustomCommands"
});
}
async run(msg, [name, ...content]) {
name = name.toLowerCase();
if (this.client.commands.has(name)) return msg.reply(`${this.client.emotes.cross} ***\`${name}\` ${msg.language.get("MESSAGE_CMD_EXISTS")}***`);
const cmd = msg.guild.settings.get("customcmds").find(c => c.name.toLowerCase() === name);
if (cmd) return msg.reply(`${this.client.emotes.cross} ***\`${name}\` ${msg.language.get("MESSAGE_CMD_EXISTS")}***`);
await msg.guild.settings.update("customcmds", { content: content.join(" "), name: name });
return msg.sendMessage(`${this.client.emotes.check} ***\`${name}\` ${msg.language.get("MESSAGE_CMD_ADDED")} ${msg.author.tag}!***`);
}
};
================================================
FILE: src/commands/Management/Custom Commands/deletecmd.js
================================================
const { Command } = require("../../../index");
module.exports = class extends Command {
constructor(...args) {
super(...args, {
runIn: ["text"],
cooldown: 10,
aliases: ["delcmd", "removecmd"],
permissionLevel: 6,
requiredPermissions: ["USE_EXTERNAL_EMOJIS"],
description: language => language.get("COMMAND_DEL_CMD_DESCRIPTION"),
usage: "<name:string>",
extendedHelp: "No extended help available."
});
}
async run(msg, [name]) {
name = name.toLowerCase();
const cmd = msg.guild.settings.get("customcmds").find(c => c.name.toLowerCase() === name);
if (!cmd) return msg.reply(`${this.client.emotes.cross} ***\`${name}\` ${msg.language.get("MESSAGE_CMD_NOTFOUND")}***`);
await msg.guild.settings.update("customcmds", cmd, { action: `remove` });
return msg.sendMessage(`${this.client.emotes.check} ***\`${name}\` ${msg.language.get("MESSAGE_CMD_REMOVED")} ${msg.author.tag}!***`);
}
};
================================================
FILE: src/commands/Management/Custom Commands/listcmds.js
================================================
const { Command, RichDisplay, MessageEmbed } = require("../../../index");
module.exports = class extends Command {
constructor(...args) {
super(...args, {
runIn: ["text"],
cooldown: 10,
aliases: ["listcommands"],
requiredPermissions: ["USE_EXTERNAL_EMOJIS", "EMBED_LINKS"],
description: language => language.get("COMMAND_LIST_CMDS_DESCRIPTION"),
extendedHelp: "No extended help available."
});
}
async run(msg) {
if (!msg.guild.settings.get("customcmds").length) return msg.reply(`${this.client.emotes.cross} ***${msg.language.get("MESSAGE_NO_CMDS")}***`);
const prefix = msg.guild.settings.get("prefix");
const names = msg.guild.settings.get("customcmds").map(cmd => cmd.name.toLowerCase());
const cmds = new RichDisplay(new MessageEmbed()
.setTitle("Use the reactions to change pages, select a page or stop viewing the commands.")
.setAuthor("Custom Commands - PenguBot", "https://i.imgur.com/DOuCQlY.png")
.setDescription("Scroll between pages to see the custom commands list.")
.setColor("#F75F4E")
);
for (let i = 0, temp = names.length; i < temp; i += 5) {
const curr = names.slice(i, i + 5);
cmds.addPage(t => t.setDescription(curr.map(c => `• ${prefix}${c}`)));
}
cmds.run(await msg.sendMessage(`${this.client.emotes.loading} Loading Commands...`), {
time: 120000,
filter: (reaction, user) => user === msg.author
});
}
};
================================================
FILE: src/commands/Management/Custom Commands/togglecustomcmds.js
================================================
const { Command } = require("../../../index");
module.exports = class extends Command {
constructor(...args) {
super(...args, {
runIn: ["text"],
cooldown: 10,
aliases: ["tccmd", "togglecustom", "tcmd", "togglecustomcommands"],
permissionLevel: 6,
requiredPermissions: ["USE_EXTERNAL_EMOJIS"],
description: language => language.get("COMMAND_TOGGLE_CUSTOM_DESCRPTION"),
extendedHelp: "No extended help available."
});
}
async run(msg) {
const toggle = !msg.guild.settings.get("toggles.customcmds");
await msg.guild.settings.update("toggles.customcmds", toggle);
return msg.sendMessage(`${toggle ? this.client.emotes.check : this.client.emotes.cross} ***${toggle ? msg.language.get("MESSAGE_COMMAND_CUSTOM_ENABLED") : msg.language.get("MESSAGE_COMMAND_CUSTOM_DISABLED")}***`);
}
};
================================================
FILE: src/commands/Management/Custom Commands/updatecmd.js
================================================
const { Command } = require("../../../index");
module.exports = class extends Command {
constructor(...args) {
super(...args, {
runIn: ["text"],
cooldown: 10,
aliases: ["changecmd"],
permissionLevel: 6,
requiredPermissions: ["USE_EXTERNAL_EMOJIS"],
description: language => language.get("COMMAND_ADD_CMD_DESCRIPTION"),
usage: "<name:string> <content:string> [...]",
usageDelim: " ",
extendedHelp: "More Information can be Found Here: https://bit.ly/PenguCustomCommands"
});
}
async run(msg, [name, ...content]) {
name = name.toLowerCase();
if (this.client.commands.has(name)) return msg.reply(`${this.client.emotes.cross} ***\`${name}\` ${msg.language.get("MESSAGE_CMD_EXISTS")}***`);
const cmd = msg.guild.settings.get("customcmds").find(c => c.name.toLowerCase() === name);
if (cmd) {
const remove = await msg.guild.settings.update("customcmds", cmd, { action: "remove" });
const add = await msg.guild.settings.update("customcmds", { content: content.join(" "), name: cmd.name }, { action: "add" });
if (add.errors || remove.errors) return msg.sendMessage(`${this.client.emotes.cross} ***There was an error, try again.***`);
return msg.sendMessage(`${this.client.emotes.check} ***\`${name}\` ${msg.language.get("MESSAGE_CMD_UPDATED")} ${msg.author.tag}!***`);
} else {
return msg.reply(`${this.client.emotes.cross} ***\`${name}\` ${msg.language.get("MESSAGE_CMD_NOTFOUND")}***`);
}
}
};
================================================
FILE: src/commands/Management/Level Roles/listlevelroles.js
================================================
const { Command, RichDisplay, MessageEmbed } = require("../../../index");
module.exports = class extends Command {
constructor(...args) {
super(...args, {
runIn: ["text"],
cooldown: 10,
aliases: ["levelroles"],
requiredPermissions: ["USE_EXTERNAL_EMOJIS", "EMBED_LINKS"],
description: language => language.get("COMMAND_LIST_LVLROLES_DESCRPTION"),
extendedHelp: "No extended help available."
});
}
async run(msg) {
const roles = msg.guild.settings.get("roles.levelrole");
if (!roles.length) return msg.sendMessage(`${this.client.emotes.cross} ***${msg.language.get("CMD_NO_SELFROLES")}***`);
const pages = new RichDisplay(new MessageEmbed()
.setTitle("Use the reactions to change pages, select a page, or stop viewing the roles")
.setAuthor("Level Based Roles - PenguBot", msg.guild.iconURL())
.setDescription("Scroll between pages to see the self assignable roles.")
.setColor("#428bca")
);
pages.addPage(t => t.setDescription(roles.map(role => `\`-\` ${msg.guild.roles.cache.get(role.id) || "Role Removed"} - Level ${role.lvl}`).join("\n")));
pages.run(await msg.sendMessage(`${this.client.emotes.loading} ***Loading Roles...***`), {
time: 120000,
filter: (reaction, user) => user === msg.author
});
}
};
================================================
FILE: src/commands/Management/Level Roles/managelevelroles.js
================================================
const { Command } = require("../../../index");
module.exports = class extends Command {
constructor(...args) {
super(...args, {
subcommands: true,
runIn: ["text"],
cooldown: 10,
aliases: ["managelevelrole", "addlevelrole", "removelevelrole"],
permissionLevel: 6,
requiredPermissions: ["USE_EXTERNAL_EMOJIS"],
description: language => language.get("COMMAND_LVLROLE_DESCRPTION"),
usage: "<add|remove> <role:rolename> [level:integer]",
usageDelim: " "
});
}
async add(msg, [role, level]) {
if (!level) throw `${this.client.emotes.cross} ***You must enter a level at which you want to award this role.***`;
if (level <= 0) throw `${this.client.emotes.cross} ***You can't give people levels if they are level ZERO or Lower, use Autoroles instead.***`;
const roles = msg.guild.settings.get("roles.levelrole");
if (roles.find(r => r.id === role.id)) throw `${this.client.emotes.cross} ***This role already exists in the leveled roles.***`;
const myRole = msg.guild.me.roles.highest;
if (role.position > myRole.positon) throw `${this.client.emotes.cross} ***That given role is above my role in the guild, please change the order.***`;
await msg.guild.settings.update("roles.levelrole", { id: role.id, lvl: level });
return msg.sendMessage(`${this.client.emotes.check} **${role.name}** Role has been added for anyone who reaches **Level ${level}** in **${msg.guild.name}**`);
}
async remove(msg, [role]) {
const levelRole = msg.guild.settings.get("roles.levelrole").find(r => r.id === role.id);
if (!levelRole) throw `${this.client.emotes.cross} ***That role doesn't exist in the Level Based Roles list.***`;
await msg.guild.settings.update("roles.levelrole", levelRole, { action: "remove" });
return msg.sendMessage(`${this.client.emotes.check} **${role.name}** Role has been removed from Level Based Roles list.`);
}
};
================================================
FILE: src/commands/Management/Level Roles/togglelevelroles.js
================================================
const { Command } = require("../../../index");
module.exports = class extends Command {
constructor(...args) {
super(...args, {
runIn: ["text"],
cooldown: 10,
aliases: ["togglelevelrole", "enablelevelroles", "disablelevelroles"],
permissionLevel: 6,
requiredPermissions: ["USE_EXTERNAL_EMOJIS"],
description: language => language.get("COMMAND_TOGGLE_LVLROLES_DESCRPTION"),
extendedHelp: "No extended help available."
});
}
async run(msg) {
const toggle = !msg.guild.settings.get("toggles.levelroles");
await msg.guild.settings.update("toggles.levelroles", toggle);
return msg.sendMessage(`${toggle ? this.client.emotes.check : this.client.emotes.cross} ${toggle ? msg.language.get("MESSAGE_LEVELROLES_ENABLED") : msg.language.get("MESSAGE_LEVELROLES_DISABLED")}`);
}
};
================================================
FILE: src/commands/Management/Logging/log.js
================================================
const { Command } = require("../../../index");
module.exports = class extends Command {
constructor(...args) {
super(...args, {
runIn: ["text"],
cooldown: 10,
aliases: ["enablelog", "disablelog", "togglelog"],
permissionLevel: 6,
requiredPermissions: ["USE_EXTERNAL_EMOJIS"],
description: language => language.get("COMMAND_LOG_DESCRPTION"),
usage: "[Option:string]",
extendedHelp: "No extended help available."
});
}
async run(msg, [Option]) {
if (!Option) return msg.reply(`${msg.language.get("CMD_LOG_INVALID")} \`automod\`, \`moderation\`, \`join\`, \`leave\`, \`channels\`, \`messages\`, \`roles\`.`);
const opt = Option.toLowerCase();
switch (opt) {
case "automod": await this.update("automod", msg);
break;
case "moderation": await this.update("moderation", msg);
break;
case "channels": await this.update("channels", msg);
break;
case "join": await this.update("join", msg);
break;
case "leave": await this.update("leave", msg);
break;
case "messages": await this.update("messages", msg);
break;
case "roles": await this.update("roles", msg);
break;
default: msg.reply(`${msg.language.get("CMD_LOG_INVALID")} \`automod\`, \`moderation\`, \`join\`, \`leave\`, \`channels\`, \`messages\`, \`roles\`.`);
}
}
async update(key, msg) {
const serverlogs = msg.guild.settings.get("serverlogs");
if (serverlogs[key]) {
const { errors } = await msg.guild.settings.update(`serverlogs.${key}`, false).catch(e => e);
if (errors) return msg.sendMessage(`${this.client.emotes.cross} ***There was an error:*** \`${errors}\``);
return msg.sendMessage(`${this.client.emotes.cross} ***\`${key}\` ${msg.language.get("CMD_LOG_DISABLED")}***`);
} else {
const { errors } = await msg.guild.settings.update(`serverlogs.${key}`, true).catch(e => e);
if (errors) return msg.sendMessage(`${this.client.emotes.cross} ***There was an error:*** \`${errors}\``);
return msg.sendMessage(`${this.client.emotes.check} ***\`${key}\` ${msg.language.get("CMD_LOG_ENABLED")}***`);
}
}
};
================================================
FILE: src/commands/Management/Logging/loggingchannel.js
================================================
const { Command } = require("../../../index");
module.exports = class extends Command {
constructor(...args) {
super(...args, {
runIn: ["text"],
cooldown: 10,
aliases: ["setloggingchannel", "setlogchannel"],
permissionLevel: 6,
requiredPermissions: ["USE_EXTERNAL_EMOJIS"],
usage: "[Channel:channelname]",
description: language => language.get("COMMAND_LOGCHAN_DESCRPTION"),
extendedHelp: "No extended help available."
});
}
async run(msg, [Channel = msg.channel]) {
return msg.guild.settings.update("channels.logs", Channel.id).then(() => {
msg.sendMessage(`${this.client.emotes.check} ***${msg.language.get("MESSAGE_LOGCHAN_SET")}***`);
});
}
};
================================================
FILE: src/commands/Management/Logging/modlogs.js
================================================
const Command = require("../../../lib/structures/KlasaCommand");
module.exports = class extends Command {
constructor(...args) {
super(...args, {
runIn: ["text"],
cooldown: 10,
aliases: ["modlog", "managemodlogs"],
permissionLevel: 6,
requiredPermissions: ["USE_EXTERNAL_EMOJIS"],
usage: "<channel|toggle> [Channel:channelname]",
usageDelim: " ",
description: language => language.get("COMMAND_MODLOG_DESCRPTION"),
extendedHelp: "No extended help available.",
subcommands: true
});
}
async channel(msg, [Channel = msg.channel]) {
const { errors } = await msg.guild.settings.update("channels.modlogs", Channel.id);
if (errors) return msg.reply(`${this.client.emotes.cross} ***There was an error: ${errors[0]}***`);
return msg.sendMessage(`${this.client.emotes.check} ***${msg.language.get("MESSAGE_LOGCHAN_SET")}***`);
}
async toggle(msg) {
const { errors } = await msg.guild.settings.update("toggles.modlogs", !msg.guild.settings.get("toggles.modlogs"));
if (errors) return msg.reply(`${this.client.emotes.cross} ***There was an error: ${errors[0]}***`);
return msg.reply(`${this.client.emotes.check} ***Mod logs have been ${msg.guild.settings.get("toggles.modlogs") ? "Enabled" : "Disabled"}.***`);
}
};
================================================
FILE: src/commands/Management/Self Roles/manageselfroles.js
================================================
const { Command } = require("../../../index");
module.exports = class extends Command {
constructor(...args) {
super(...args, {
runIn: ["text"],
requiredPermissions: ["SEND_MESSAGES", "EMBED_LINKS", "USE_EXTERNAL_EMOJIS", "MANAGE_ROLES"],
aliases: ["addselfrole", "addselfroles", "removeselfrole", "removeselfroles"],
cooldown: 5,
permissionLevel: 6,
description: language => language.get("COMMAND_SELFROLES_MANAGE"),
extendedHelp: "No extended help available.",
usage: "<role:rolename>"
});
}
async run(msg, [role]) {
const roles = msg.guild.settings.get("roles.selfrole");
if (!roles) return msg.sendMessage(`${this.client.emotes.cross} ***${msg.language.get("CMD_NO_SELFROLES")}***`);
if (!roles.includes(role.id)) {
await msg.guild.settings.update("roles.selfrole", role, msg.guild);
return msg.sendMessage(`${this.client.emotes.check} ***\`${role.name}\` ${msg.language.get("CMD_SELF_ASSIGNABLE")}***`);
} else {
await msg.guild.settings.update("roles.selfrole", role, msg.guild);
return msg.sendMessage(`${this.client.emotes.cross} ***\`${role.name}\` ${msg.language.get("CMD_NO_ASSIGNABLE")}***`);
}
}
};
================================================
FILE: src/commands/Management/Self Roles/selfroles.js
================================================
const { Command, RichDisplay, MessageEmbed } = require("../../../index");
module.exports = class extends Command {
constructor(...args) {
super(...args, {
runIn: ["text"],
requiredPermissions: ["SEND_MESSAGES", "EMBED_LINKS", "USE_EXTERNAL_EMOJIS", "MANAGE_ROLES"],
aliases: ["selfrole"],
cooldown: 5,
permissionLevel: 0,
description: language => language.get("COMMAND_SELFROLES"),
extendedHelp: "No extended help available.",
usage: "<add|remove|list> [role:rolename]",
usageDelim: " ",
subcommands: true
});
}
async list(msg) {
const roles = msg.guild.settings.get("roles.selfrole");
if (!roles.length) return msg.sendMessage(`${this.client.emotes.cross} ***${msg.language.get("CMD_NO_SELFROLES")}***`);
const pages = new RichDisplay(new MessageEmbed()
.setTitle("Use the reactions to change pages, select a page, or stop viewing the roles")
.setAuthor("Self Roles - PenguBot", msg.guild.iconURL())
.setDescription("Scroll between pages to see the self assignable roles.")
.setColor("#428bca")
);
pages.addPage(t => t.setDescription(roles.map(role => `\`-\` ${msg.guild.roles.cache.get(role) || "Role Removed"}`).join("\n")));
pages.run(await msg.sendMessage(`${this.client.emotes.loading} ***Loading Roles...***`), {
time: 120000,
filter: (reaction, user) => user === msg.author
});
}
async add(msg, [role]) {
if (!role) return msg.sendMessage(`${this.client.emotes.cross} ***You must specify a role in order to use this command.***`);
const roles = msg.guild.settings.get("roles.selfrole");
if (!roles.length) return msg.sendMessage(`${this.client.emotes.cross} ***${msg.language.get("CMD_NO_SELFROLES")}***`);
if (!roles.includes(role.id) || !role) return msg.sendMessage(`${this.client.emotes.cross} ***That given role is not self assignable do \`${msg.guild.settings.get("prefix")}selfroles list\` to know all the self assignable roles.***`);
const myRole = msg.guild.me.roles.highest;
if (role.position > myRole.positon) return msg.sendMessage(`${this.client.emotes.cross} ***That given role is above my role in the guild, please change the order.***`);
if (msg.member.roles.cache.has(role.id)) return msg.sendMessage(`${this.client.emotes.cross} ***You already have that role do \`${msg.guild.settings.get("prefix")}selfroles remove ${role.name}\` to remove it.***`);
const assigned = await msg.member.roles.add(role, "Self Assigned").catch(() => null);
if (!assigned) return msg.sendMessage(`${this.client.emotes.cross} ***There was an error, please try again later.***`);
return msg.sendMessage(`${this.client.emotes.check} ***The role has been assigned.***`);
}
async remove(msg, [role]) {
if (!role) return msg.sendMessage(`${this.client.emotes.cross} ***You must specify a role in order to use this command.***`);
const roles = msg.guild.settings.get("roles.selfrole");
if (!roles.length) return msg.sendMessage(`${this.client.emotes.cross} ***This guild does not have any self assignable roles or you didn't mention any.***`);
if (!roles.includes(role.id) || !role) return msg.sendMessage(`${this.client.emotes.cross} ***That given role is not self assignable do \`${msg.guild.settings.get("prefix")}selfroles list\` to know all the self assignable roles.***`);
const myRole = msg.guild.me.roles.highest;
if (role.position > myRole.positon) return msg.sendMessage(`${this.client.emotes.cross} ***That given role is above my role in the guild, please change the order.***`);
if (!msg.member.roles.cache.has(role.id)) return msg.sendMessage(`${this.client.emotes.cross} ***You don't have that role do \`${msg.guild.settings.get("prefix")}selfroles add ${role.name}\` to add it.***`);
const assigned = await msg.member.roles.remove(role, "Self Deassigned").catch(() => null);
if (!assigned) return msg.sendMessage(`${this.client.emotes.cross} ***There was an error, please try again later.***`);
return msg.sendMessage(`${this.client.emotes.cross} ***The role has been deassigned.***`);
}
};
================================================
FILE: src/commands/Management/Self Roles/toggleselfroles.js
================================================
const { Command } = require("../../../index");
module.exports = class extends Command {
constructor(...args) {
super(...args, {
runIn: ["text"],
cooldown: 10,
aliases: ["toggleselfrole", "enableselfroles", "disableselfroles"],
permissionLevel: 6,
requiredPermissions: ["USE_EXTERNAL_EMOJIS"],
description: language => language.get("COMMAND_TOGGLE_SELFROLES"),
extendedHelp: "No extended help available."
});
}
async run(msg) {
const toggle = !msg.guild.settings.get("toggles.selfroles");
await msg.guild.settings.update("toggles.selfroles", toggle);
return msg.sendMessage(`${toggle ? this.client.emotes.check : this.client.emotes.cross} ${toggle ? msg.language.get("MESSAGE_AUTOROLES_ENABLED") : msg.language.get("MESSAGE_AUTOROLES_DISABLED")}`);
}
};
================================================
FILE: src/commands/Management/Starboard/starboard.js
================================================
const { Command, MessageEmbed } = require("../../../index");
module.exports = class extends Command {
constructor(...args) {
super(...args, {
runIn: ["text"],
cooldown: 10,
aliases: ["star"],
permissionLevel: 5,
requiredPermissions: ["USE_EXTERNAL_EMOJIS"],
usage: "<Message:message>",
description: language => language.get("COMMAND_STAR_DESCRPTION"),
extendedHelp: "No extended help available."
});
}
async run(msg, [Message]) {
const starChannel = msg.guild.channels.cache.find(c => c.id === msg.guild.settings.get("starboard.channel"));
if (!starChannel || !starChannel.postable) return msg.reply("I do not have permissions to send Embeds in Starboard channel or Channel not found.");
if (!starChannel.nsfw && msg.channel.nsfw) return msg.reply("This message is from an NSFW channel while your Starboard Channel is SFW, I can't send it there sorry!");
const fetch = await starChannel.messages.fetch({ limit: 100 });
const starMsg = fetch.find(m => m.embeds[0] && m.embeds[0].footer && m.embeds[0].footer.text.startsWith("⭐") && m.embeds[0].footer.text.endsWith(Message.id));
const jumpString = `[► View The Original Message](https://discordapp.com/channels/${Message.guild.id}/${Message.channel.id}/${Message.id})\n`;
if (starMsg) {
const star = /^\⭐\s([0-9]{1,3})\s\|\s([0-9]{17,20})/.exec(starMsg.embeds[0].footer.text); // eslint-disable-line
const starEmbed = starMsg.embeds[0];
const image = Message.attachments.size > 0 ? await this.checkAttachments(Message.attachments.array()[0].url) : null;
const embed = new MessageEmbed()
.setColor(starEmbed.color)
.setAuthor(`${Message.author.tag} in #${Message.channel.name}`, Message.author.displayAvatarURL())
.setTimestamp(new Date(Message.createdTimestamp))
.setFooter(`⭐ ${Message.reactions.cache.get("⭐").count} | ${msg.id}`);
if (image) embed.setImage(image);
if (starEmbed.description) embed.setDescription(`${jumpString}${starEmbed.description}`);
else embed.setDescription(jumpString);
const oldMsg = await starChannel.messages.fetch(starMsg.id);
await oldMsg.edit({ embed });
} else {
const image = Message.attachments.size > 0 ? await this.checkAttachments(Message.attachments.array()[0].url) : null;
if (!image && Message.content.length < 1) return msg.reply("Can not star an Empty Message.");
await Message.react("⭐");
const embed = new MessageEmbed()
.setColor(15844367)
.setAuthor(`${Message.author.tag} in #${Message.channel.name}`, Message.author.displayAvatarURL())
.setTimestamp(new Date(Message.createdTimestamp))
.setFooter(`⭐ ${Message.reactions.cache.get("⭐").count} | ${Message.id}`);
if (image) embed.setImage(image);
if (Message.content) embed.setDescription(`${jumpString}${Message.content}`);
await starChannel.send({ embed });
}
}
checkAttachments(attachment) {
const imageLink = attachment.split(".");
const typeOfImage = imageLink[imageLink.length - 1];
const image = /(jpg|jpeg|png|gif)/gi.test(typeOfImage);
if (!image) return null;
return attachment;
}
};
================================================
FILE: src/commands/Management/Starboard/starboardchannel.js
================================================
const { Command } = require("../../../index");
module.exports = class extends Command {
constructor(...args) {
super(...args, {
runIn: ["text"],
cooldown: 10,
aliases: ["ssc", "setstarboardchannel"],
permissionLevel: 6,
requiredPermissions: ["USE_EXTERNAL_EMOJIS"],
usage: "[channel:channelname]",
usageDelim: "",
description: language => language.get("COMMAND_CHANNEL_STAR_DESCRPTION"),
extendedHelp: "No extended help available."
});
}
async run(msg, [channel = msg.channel]) {
return msg.guild.settings.update("starboard.channel", channel.id).then(() => {
msg.sendMessage(`${this.client.emotes.check} ***${msg.language.get("MESSAGE_STAR_CHANNEL_SET")}***`);
});
}
};
================================================
FILE: src/commands/Management/Starboard/starsrequired.js
================================================
const { Command } = require("../../../index");
module.exports = class extends Command {
constructor(...args) {
super(...args, {
runIn: ["text"],
cooldown: 10,
aliases: ["setstars", "setminimumstars"],
permissionLevel: 6,
requiredPermissions: ["USE_EXTERNAL_EMOJIS"],
usage: "<Stars:integer>",
description: language => language.get("COMMAND_REQUIRED_STAR_DESCRPTION"),
extendedHelp: "No extended help available."
});
}
async run(msg, [Stars]) {
if (Stars < 1) return msg.sendMessage(`***${this.client.emotes.cross} Required Stars for Starboard can't be less than 1***`);
return msg.guild.settings.update("starboard.required", Stars).then(() => {
msg.sendMessage(`${this.client.emotes.check} ***${msg.language.get("MESSAGE_STARS_REQUIRED_SET")}***`);
});
}
};
================================================
FILE: src/commands/Management/Starboard/togglestarboard.js
================================================
const { Command } = require("../../../index");
module.exports = class extends Command {
constructor(...args) {
super(...args, {
runIn: ["text"],
cooldown: 10,
aliases: ["tsb", "togglestarboards"],
permissionLevel: 6,
requiredPermissions: ["USE_EXTERNAL_EMOJIS"],
description: language => language.get("COMMAND_TOGGLE_STARBOARD_DESCRPTION"),
extendedHelp: "No extended help available."
});
}
async run(msg) {
const toggle = !msg.guild.settings.get("toggles.starboard");
await msg.guild.settings.update("toggles.starboard", toggle);
return msg.sendMessage(`${toggle ? this.client.emotes.check : this.client.emotes.cross} ${toggle ? msg.language.get("MESSAGE_STAR_ENABLED") : msg.language.get("MESSAGE_STAR_DISABLED")}`);
}
};
================================================
FILE: src/commands/Management/Welcome & Leave/setleavechannel.js
================================================
const { Command } = require("../../../index");
module.exports = class extends Command {
constructor(...args) {
super(...args, {
runIn: ["text"],
cooldown: 10,
aliases: ["slc", "setleavechan"],
permissionLevel: 6,
requiredPermissions: ["USE_EXTERNAL_EMOJIS"],
usage: "[channel:channelname]",
description: language => language.get("COMMAND_CHANNEL_LEAVE_DESCRPTION"),
extendedHelp: "No extended help available."
});
}
async run(msg, [channel = msg.channel]) {
return this.dbQuery(msg, channel).then(() => {
msg.sendMessage(`${this.client.emotes.check} ***${msg.language.get("MESSAGE_LEAVE_CHANNEL_SET")}***`);
});
}
async dbQuery(msg, channel) {
const r = this.client.providers.default.db;
const query = await r.table("guilds").get(msg.guild.id)
.update({ channels: { leave: channel.id } })
.run()
.catch(e => {
console.error(`${this.name} error:\n${e}`);
throw `There was an error, please contact us on our support server: <https://pengubot.com/support>\n${e}`;
});
await msg.guild.settings.sync(true);
return query;
}
};
================================================
FILE: src/commands/Management/Welcome & Leave/setleavemsg.js
================================================
const { Command } = require("../../../index");
module.exports = class extends Command {
constructor(...args) {
super(...args, {
runIn: ["text"],
cooldown: 10,
aliases: ["slm", "setleavemessage"],
permissionLevel: 6,
requiredPermissions: ["USE_EXTERNAL_EMOJIS"],
usage: "<message:string>",
description: language => language.get("COMMAND_SET_LEAVE_DESCRPTION"),
extendedHelp: "No extended help available."
});
}
async run(msg, [message]) {
return msg.guild.settings.update("messages.leave", message).then(() => {
msg.sendMessage(`${this.client.emotes.check} ***${msg.language.get("MESSAGE_LEAVE_SET")}***`);
});
}
};
================================================
FILE: src/commands/Management/Welcome & Leave/setwelcomechannel.js
================================================
const { Command } = require("../../../index");
module.exports = class extends Command {
constructor(...args) {
super(...args, {
runIn: ["text"],
cooldown: 10,
aliases: ["swc", "setwelcomechan"],
permissionLevel: 6,
requiredPermissions: ["USE_EXTERNAL_EMOJIS"],
usage: "[channel:channelname]",
description: language => language.get("COMMAND_CHANNEL_WELCOME_DESCRPTION"),
extendedHelp: "No extended help available."
});
}
async run(msg, [channel = msg.channel]) {
return this.dbQuery(msg, channel).then(() => {
msg.sendMessage(`${this.client.emotes.check} ***${msg.language.get("MESSAGE_WELCOME_CHANNEL_SET")}***`);
});
}
async dbQuery(msg, channel) {
const r = this.client.providers.default.db;
const query = await r.table("guilds").get(msg.guild.id)
.update({ channels: { join: channel.id } })
.run()
.catch(e => {
console.error(`${this.name} error:\n${e}`);
throw `There was an error, please contact us on our support server: <https://pengubot.com/support>\n${e}`;
});
await msg.guild.settings.sync(true);
return query;
}
};
================================================
FILE: src/commands/Management/Welcome & Leave/setwelcomemsg.js
================================================
const { Command } = require("../../../index");
module.exports = class extends Command {
constructor(...args) {
super(...args, {
runIn: ["text"],
cooldown: 10,
aliases: ["swm", "setwelcomemmessage"],
permissionLevel: 6,
requiredPermissions: ["USE_EXTERNAL_EMOJIS"],
usage: "<message:string>",
description: language => language.get("COMMAND_SET_WELCOME_DESCRPTION"),
extendedHelp: "No extended help available."
});
}
async run(msg, [message]) {
return msg.guild.settings.update("messages.join", message).then(() => {
msg.sendMessage(`${this.client.emotes.check} ***${msg.language.get("MESSAGE_WELCOME_SET")}***`);
});
}
};
================================================
FILE: src/commands/Management/Welcome & Leave/toggleleave.js
================================================
const { Command } = require("../../../index");
module.exports = class extends Command {
constructor(...args) {
super(...args, {
runIn: ["text"],
cooldown: 10,
aliases: ["tlm", "toggleleavemessages"],
permissionLevel: 6,
requiredPermissions: ["USE_EXTERNAL_EMOJIS"],
description: language => language.get("COMMAND_TOGGLE_LEAVE_DESCRPTION"),
extendedHelp: "No extended help available."
});
}
async run(msg) {
if (!msg.guild.settings.get("toggles.leavemsg")) {
if (!msg.guild.channels.cache.get(msg.guild.settings.get("channels.leave"))) { await msg.guild.settings.update("channels.leave", msg.channel.id); }
if (!msg.guild.settings.get("messages.leave")) await msg.guild.settings.update("messages.leave", "It's sad to see you leaving **{USERNAME}**!", { action: "add" });
return msg.guild.settings.update("toggles.leavemsg", true).then(() => {
msg.sendMessage(`${this.client.emotes.check} ***${msg.language.get("MESSAGE_LEAVE_ENABLED")}***`);
});
} else {
return msg.guild.settings.update("toggles.leavemsg", false).then(() => {
msg.sendMessage(`${this.client.emotes.cross} ***${msg.language.get("MESSAGE_LEAVE_DISABLED")}***`);
});
}
}
};
================================================
FILE: src/commands/Management/Welcome & Leave/togglewelcome.js
================================================
const { Command } = require("../../../index");
module.exports = class extends Command {
constructor(...args) {
super(...args, {
runIn: ["text"],
cooldown: 10,
aliases: ["twm", "togglewelcomemessages"],
permissionLevel: 6,
requiredPermissions: ["USE_EXTERNAL_EMOJIS"],
description: language => language.get("COMMAND_TOGGLE_WELCOME_DESCRPTION"),
extendedHelp: "No extended help available."
});
}
async run(msg) {
if (!msg.guild.settings.get("toggles.joinmsg")) {
if (!msg.guild.channels.cache.get(msg.guild.settings.get("channels.join"))) { await msg.guild.settings.update("channels.join", msg.channel.id); }
if (!msg.guild.settings.get("messages.join")) await msg.guild.settings.update("messages.join", "Welcome {MENTION} to {SERVER}, we hope you enjoy your stay!", { action: "add" });
return msg.guild.settings.update("toggles.joinmsg", true).then(() => {
msg.sendMessage(`${this.client.emotes.check} ***${msg.language.get("MESSAGE_WLCM_ENABLED")}***`);
});
} else {
return msg.guild.settings.update("toggles.joinmsg", false).then(() => {
msg.sendMessage(`${this.client.emotes.cross} ***${msg.language.get("MESSAGE_WLCM_DISABLED")}***`);
});
}
}
};
================================================
FILE: src/commands/Manipulation/achievement.js
================================================
const { Command } = require("../../index");
module.exports = class extends Command {
constructor(...args) {
super(...args, {
cooldown: 8,
aliases: ["mca", "makeachievement", "achievementget"],
requiredPermissions: ["ATTACH_FILES", "USE_EXTERNAL_EMOJIS", "EMBED_LINKS"],
description: language => language.get("COMMAND_MCA_DESCRIPTION"),
extendedHelp: "No extended help available.",
usage: "<achievement:string{1,20}>"
});
}
async run(msg, [achievement]) {
const image = await this.client.funcs.images("generate/achievement", { avatar: msg.author.displayAvatarURL({ format: "png", size: 128 }), text: achievement })
.catch(() => null);
if (!image) return msg.reply(msg.language.get("ER_TRY_AGAIN"));
return msg.channel.sendFile(image);
}
};
================================================
FILE: src/commands/Manipulation/approved.js
================================================
const { Command } = require("../../index");
module.exports = class extends Command {
constructor(...args) {
super(...args, {
cooldown: 8,
requiredPermissions: ["ATTACH_FILES", "USE_EXTERNAL_EMOJIS", "EMBED_LINKS"],
description: language => language.get("COMMAND_APPROVED_DESCRIPTION"),
extendedHelp: "No extended help available.",
usage: "[approvewho:username]"
});
}
async run(msg, [approvewho = msg.author]) {
const image = await this.client.funcs.images("overlay/approved", { avatar: approvewho.displayAvatarURL({ format: "png", size: 512 }) })
.catch(() => null);
if (!image) return msg.reply(msg.language.get("ER_TRY_AGAIN"));
return msg.channel.sendFile(image);
}
};
================================================
FILE: src/commands/Manipulation/batslap.js
================================================
const { Command } = require("../../index");
module.exports = class extends Command {
constructor(...args) {
super(...args, {
cooldown: 8,
aliases: ["slapme"],
requiredPermissions: ["ATTACH_FILES", "USE_EXTERNAL_EMOJIS", "EMBED_LINKS"],
description: language => language.get("COMMAND_BATSLAP_DESCRIPTION"),
extendedHelp: "No extended help available.",
usage: "<user:username>"
});
}
async run(msg, [user]) {
const image = await this.client.funcs.images("generate/batslap", { slapper: msg.author.displayAvatarURL({ format: "png", size: 128 }), slapped: user.displayAvatarURL({ format: "png", size: 128 }) })
.catch(() => null);
if (!image) return msg.reply(msg.language.get("ER_TRY_AGAIN"));
return msg.channel.sendFile(image);
}
};
================================================
FILE: src/commands/Manipulation/beautiful.js
================================================
const { Command } = require("../../index");
module.exports = class extends Command {
constructor(...args) {
super(...args, {
cooldown: 8,
aliases: ["beautify"],
requiredPermissions: ["ATTACH_FILES", "USE_EXTERNAL_EMOJIS", "EMBED_LINKS"],
description: language => language.get("COMMAND_BEAUTIFUL_DESCRIPTION"),
extendedHelp: "No extended help available.",
usage: "[user:username]"
});
}
async run(msg, [user = msg.author]) {
const image = await this.client.funcs.images("generate/beautiful", { avatar: user.displayAvatarURL({ format: "png", size: 128 }) })
.catch(() => null);
if (!image) return msg.reply(msg.language.get("ER_TRY_AGAIN"));
return msg.channel.sendFile(image);
}
};
================================================
FILE: src/commands/Manipulation/changemymind.js
================================================
const { Command } = require("../../index");
module.exports = class extends Command {
constructor(...args) {
super(...args, {
cooldown: 8,
aliases: ["cmm"],
requiredPermissions: ["ATTACH_FILES", "USE_EXTERNAL_EMOJIS", "EMBED_LINKS"],
description: language => language.get("COMMAND_CMM_DESCRIPTION"),
extendedHelp: "No extended help available.",
usage: "<text:str>"
});
}
async run(msg, [text]) {
const image = await this.client.funcs.images("generate/changemymind", { text: text, avatar: msg.author.displayAvatarURL({ format: "png", size: 128 }) })
.catch(() => null);
if (!image) return msg.reply(msg.language.get("ER_TRY_AGAIN"));
return msg.channel.sendFile(image);
}
};
================================================
FILE: src/commands/Manipulation/facepalm.js
================================================
const { Command } = require("../../index");
module.exports = class extends Command {
constructor(...args) {
super(...args, {
cooldown: 8,
requiredPermissions: ["ATTACH_FILES", "USE_EXTERNAL_EMOJIS", "EMBED_LINKS"],
description: language => language.get("COMMAND_FACEPALM_DESCRIPTION"),
extendedHelp: "No extended help available.",
usage: "[user:username]"
});
}
async run(msg, [user = msg.author]) {
const image = await this.client.funcs.images("generate/facepalm", { avatar: user.displayAvatarURL({ format: "png", size: 256 }) })
.catch(() => null);
if (!image) return msg.reply(msg.language.get("ER_TRY_AGAIN"));
return msg.channel.sendFile(image);
}
};
================================================
FILE: src/commands/Manipulation/garbage.js
================================================
const { Command } = require("../../index");
module.exports = class extends Command {
constructor(...args) {
super(...args, {
cooldown: 8,
aliases: ["garbagewho"],
requiredPermissions: ["ATTACH_FILES", "USE_EXTERNAL_EMOJIS", "EMBED_LINKS"],
description: language => language.get("COMMAND_GARBAGE_DESCRIPTION"),
extendedHelp: "No extended help available.",
usage: "[garbagewho:username]"
});
}
async run(msg, [garbagewho = msg.author]) {
const image = await this.client.funcs.images("generate/garbage", { avatar: garbagewho.displayAvatarURL({ format: "png", size: 256 }) })
.catch(() => null);
if (!image) return msg.reply(msg.language.get("ER_TRY_AGAIN"));
return msg.channel.sendFile(image);
}
};
================================================
FILE: src/commands/Manipulation/illegal.js
================================================
const { Command } = require("../../index");
module.exports = class extends Command {
constructor(...args) {
super(...args, {
cooldown: 8,
aliases: ["isnowillegal", "trumpillegal"],
requiredPermissions: ["ATTACH_FILES", "USE_EXTERNAL_EMOJIS", "EMBED_LINKS"],
description: language => language.get("COMMAND_ILLEGAL_DESCRIPTION"),
extendedHelp: "No extended help available.",
usage: "<name:string>"
});
}
async run(msg, [name]) {
const image = await this.client.funcs.images("generate/illegal", { text: name })
.catch(() => null);
if (!image) return msg.sendMessage(`${this.client.emotes.cross} You got Trumped, couldn't create a new bill! Try something else.`);
return msg.channel.sendFile(image);
}
};
================================================
FILE: src/commands/Manipulation/lio.js
================================================
const { Command } = require("../../index");
module.exports = class extends Command {
constructor(...args) {
super(...args, {
cooldown: 8,
aliases: ["lionme"],
requiredPermissions: ["ATTACH_FILES", "USE_EXTERNAL_EMOJIS", "EMBED_LINKS"],
description: language => language.get("COMMAND_LIO_DESCRIPTION"),
extendedHelp: "No extended help available.",
usage: "[user:username]"
});
}
async run(msg, [user = msg.author]) {
const image = await this.client.funcs.images("generate/lio", { avatar: user.displayAvatarURL({ format: "png", size: 256 }) })
.catch(() => null);
if (!image) return msg.reply(msg.language.get("ER_TRY_AGAIN"));
return msg.channel.sendFile(image);
}
};
================================================
FILE: src/commands/Manipulation/missing.js
================================================
const { Command } = require("../../index");
module.exports = class extends Command {
constructor(...args) {
super(...args, {
cooldown: 8,
aliases: ["missingposter"],
requiredPermissions: ["ATTACH_FILES", "USE_EXTERNAL_EMOJIS", "EMBED_LINKS"],
description: language => language.get("COMMAND_MISSING_DESCRIPTION"),
extendedHelp: "No extended help available.",
usage: "[user:username]"
});
}
async run(msg, [user = msg.author]) {
const image = await this.client.funcs.images("generate/missing", { text: user.username, avatar: user.displayAvatarURL({ format: "png", size: 256 }) })
.catch(() => null);
if (!image) return msg.reply(msg.language.get("ER_TRY_AGAIN"));
return msg.channel.sendFile(image);
}
};
================================================
FILE: src/commands/Manipulation/rejected.js
================================================
const { Command } = require("../../index");
module.exports = class extends Command {
constructor(...args) {
super(...args, {
cooldown: 8,
requiredPermissions: ["ATTACH_FILES", "USE_EXTERNAL_EMOJIS", "EMBED_LINKS"],
description: language => language.get("COMMAND_REJECT_DESCRIPTION"),
extendedHelp: "No extended help available.",
usage: "[rejectwho:username]"
});
}
async run(msg, [rejectwho = msg.author]) {
const image = await this.client.funcs.images("overlay/rejected", { avatar: rejectwho.displayAvatarURL({ format: "png", size: 512 }) })
.catch(() => null);
if (!image) return msg.reply(msg.language.get("ER_TRY_AGAIN"));
return msg.channel.sendFile(image);
}
};
================================================
FILE: src/commands/Manipulation/respect.js
================================================
const { Command } = require("../../index");
module.exports = class extends Command {
constructor(...args) {
super(...args, {
cooldown: 8,
aliases: ["rip"],
requiredPermissions: ["ATTACH_FILES", "USE_EXTERNAL_EMOJIS", "EMBED_LINKS"],
description: language => language.get("COMMAND_RIP_DESCRIPTION"),
extendedHelp: "No extended help available.",
usage: "[user:username]"
});
}
async run(msg, [user = msg.author]) {
const image = await this.client.funcs.images("generate/respect", { avatar: user.displayAvatarURL({ format: "png", size: 128 }) })
.catch(() => null);
if (!image) return msg.reply(msg.language.get("ER_TRY_AGAIN"));
return msg.channel.sendFile(image);
}
};
================================================
FILE: src/commands/Manipulation/snap.js
================================================
const { Command } = require("../../index");
module.exports = class extends Command {
constructor(...args) {
super(...args, {
cooldown: 8,
aliases: ["snapchat"],
requiredPermissions: ["ATTACH_FILES", "USE_EXTERNAL_EMOJIS", "EMBED_LINKS"],
description: language => language.get("COMMAND_SNAPCHAT_DESCRIPTION"),
extendedHelp: "No extended help available.",
usage: "<snaptext:str>"
});
}
async run(msg, [snaptext]) {
const image = await this.client.funcs.images("generate/snpchat", { text: snaptext })
.catch(() => null);
if (!image) return msg.reply(msg.language.get("ER_TRY_AGAIN"));
return msg.channel.sendFile(image);
}
};
================================================
FILE: src/commands/Manipulation/superpunch.js
================================================
const { Command } = require("../../index");
module.exports = class extends Command {
constructor(...args) {
super(...args, {
cooldown: 8,
aliases: ["megapunch"],
requiredPermissions: ["ATTACH_FILES", "USE_EXTERNAL_EMOJIS", "EMBED_LINKS"],
description: language => language.get("COMMAND_SUPERPUNCH_DESCRIPTION"),
extendedHelp: "No extended help available.",
usage: "<user:username>"
});
}
async run(msg, [user]) {
const image = await this.client.funcs.images("generate/superpunch", { avatar1: msg.author.displayAvatarURL({ format: "png", size: 128 }), avatar2: user.displayAvatarURL({ format: "png", size: 128 }) })
.catch(() => null);
if (!image) return msg.reply(msg.language.get("ER_TRY_AGAIN"));
return msg.channel.sendFile(image);
}
};
================================================
FILE: src/commands/Manipulation/tattoo.js
================================================
const { Command } = require("../../index");
module.exports = class extends Command {
constructor(...args) {
super(...args, {
cooldown: 8,
aliases: ["tatted"],
requiredPermissions: ["ATTACH_FILES", "USE_EXTERNAL_EMOJIS", "EMBED_LINKS"],
description: language => language.get("COMMAND_TATTOO_DESCRIPTION"),
extendedHelp: "No extended help available.",
usage: "[user:username]"
});
}
async run(msg, [user = msg.author]) {
const image = await this.client.funcs.images("generate/tattoo", { avatar: user.displayAvatarURL({ format: "png", size: 512 }) })
.catch(() => null);
if (!image) return msg.reply(msg.language.get("ER_TRY_AGAIN"));
return msg.channel.sendFile(image);
}
};
================================================
FILE: src/commands/Manipulation/tinder.js
================================================
const { Command } = require("../../index");
module.exports = class extends Command {
constructor(...args) {
super(...args, {
cooldown: 8,
requiredPermissions: ["ATTACH_FILES", "USE_EXTERNAL_EMOJIS", "EMBED_LINKS"],
description: language => language.get("COMMAND_TINDER_DESCRIPTION"),
extendedHelp: "No extended help available.",
usage: "<matchwith:username>"
});
}
async run(msg, [matchwith]) {
if (matchwith.id === msg.author.id) return msg.reply(msg.language.get("ER_TINDER"));
const image = await this.client.funcs.images("generate/tinder", { avatar1: msg.author.displayAvatarURL({ format: "png", size: 256 }), avatar2: matchwith.displayAvatarURL({ format: "png", size: 256 }) })
.catch(() => null);
if (!image) return msg.reply(msg.language.get("ER_TRY_AGAIN"));
return msg.channel.sendFile(image);
}
};
================================================
FILE: src/commands/Manipulation/triggered.js
================================================
const { Command } = require("../../index");
module.exports = class extends Command {
constructor(...args) {
super(...args, {
cooldown: 8,
aliases: ["trigger"],
requiredPermissions: ["ATTACH_FILES", "USE_EXTERNAL_EMOJIS", "EMBED_LINKS"],
description: language => language.get("COMMAND_TRIGGERED_DESCRIPTION"),
extendedHelp: "No extended help available.",
usage: "[user:username]"
});
}
async run(msg, [user = msg.author]) {
const image = await this.client.funcs.images("generate/triggered", { avatar: user.displayAvatarURL({ format: "png", size: 512 }) })
.catch(() => null);
if (!image) return msg.reply(msg.language.get("ER_TRY_AGAIN"));
return msg.channel.sendFile(image, "triggered.gif");
}
};
================================================
FILE: src/commands/Manipulation/vault.js
================================================
const { Command } = require("../../index");
module.exports = class extends Command {
constructor(...args) {
super(...args, {
cooldown: 8,
requiredPermissions: ["ATTACH_FILES", "USE_EXTERNAL_EMOJIS", "EMBED_LINKS"],
description: language => language.get("COMMAND_VAULT_DESCRIPTION"),
extendedHelp: "No extended help available.",
usage: "[user:username]"
});
}
async run(msg, [user = msg.author]) {
const image = await this.client.funcs.images("generate/vault", { avatar: user.displayAvatarURL({ format: "png", size: 128 }) })
.catch(() => null);
if (!image) return msg.reply(msg.language.get("ER_TRY_AGAIN"));
return msg.channel.sendFile(image);
}
};
================================================
FILE: src/commands/Manipulation/wanted.js
================================================
const { Command } = require("../../index");
module.exports = class extends Command {
constructor(...args) {
super(...args, {
cooldown: 8,
aliases: ["wantedposter"],
requiredPermissions: ["ATTACH_FILES", "USE_EXTERNAL_EMOJIS", "EMBED_LINKS"],
description: language => language.get("COMMAND_WANTED_DESCRIPTION"),
extendedHelp: "No extended help available.",
usage: "[user:username]"
});
}
async run(msg, [user = msg.author]) {
const image = await this.client.funcs.images("generate/wanted", { avatar: user.displayAvatarURL({ format: "png", size: 512 }) })
.catch(() => null);
if (!image) return msg.reply(msg.language.get("ER_TRY_AGAIN"));
return msg.channel.sendFile(image);
}
};
================================================
FILE: src/commands/Moderation/ban.js
================================================
/* eslint-disable no-unused-expressions */
const { Command, ModLog, Duration } = require("../../index");
module.exports = class extends Command {
constructor(...args) {
super(...args, {
runIn: ["text"],
cooldown: 10,
aliases: ["banmember"],
permissionLevel: 5,
requiredPermissions: ["USE_EXTERNAL_EMOJIS", "BAN_MEMBERS"],
description: language => language.get("COMMAND_BAN_DESCRIPTION"),
quotedStringSupport: false,
usage: "<user:username> [reason:string] [...]",
usageDelim: " ",
extendedHelp: "`--duration <1d-14d>` to Temporary Ban a User\n`--messages <1-7>` for days of messages to delete"
});
}
// eslint-disable-next-line complexity
async run(msg, [user, ...reason]) {
reason = reason ? reason.join(" ") : null;
if (user.id === msg.author.id) return msg.reply(`${this.client.emotes.cross} ***${msg.language.get("MESSAGE_BAN_YOURSELF")}***`);
if (user.id === this.client.user.id) return msg.reply(`${this.client.emotes.cross} ***${msg.language.get("MESSAGE_BAN_PENGU")}***`);
let target = await msg.guild.members.fetch(user.id).catch(() => null);
if (target) {
if (target.roles.highest.position >= msg.member.roles.highest.position) return msg.reply(`${this.client.emotes.cross} ***Target member is higher in role hierarchy than you.***`);
else if (!target.bannable) return msg.reply(`${this.client.emotes.cross} ***${msg.language.get("MESSAGE_BAN_CANT")}***`);
} else {
target = user;
}
let msgDays = msg.flagArgs.messages || msg.flagArgs.msg;
msgDays = Number(msgDays);
const banDays = msg.flagArgs.duration || msg.flagArgs.tempban || msg.flagArgs.time || null;
let duration;
banDays ? duration = new Duration(banDays) : null;
if (msgDays && (!typeof msgDays === Number || msgDays < 1 || msgDays >= 8)) throw `${this.client.emotes.cross} ***Invalid days of messages to be deleted, 1-7 only.***`;
if (banDays && (duration.offset < 1 || duration.offset > 2592000000)) throw `${this.client.emotes.cross} ***Invalid temporary ban days, maximum 30 days only.***`;
await msg.guild.members.ban(target, { reason: reason ? reason : `No Reason Specified - ${msg.author.tag}`, days: msgDays });
if (msg.guild.settings.get("toggles.modlogs")) {
await new ModLog(msg.guild)
.setType("ban")
.setModerator(msg.author)
.setReason(reason)
.setUser(user)
.send();
}
if (banDays) await this.client.schedule.create("timedBan", duration, { data: { guildID: msg.guild.id, userID: user.id }, catchUp: true });
return msg.sendMessage(`${this.client.emotes.check} ***${user.tag ? user.tag : user.user.tag} ${msg.language.get("MESSAGE_BANNED")}${duration > 0 ? ` Temp Ban for: ${banDays}` : ""}***`);
}
};
================================================
FILE: src/commands/Moderation/case.js
================================================
const { Command, MessageEmbed } = require("../../index");
module.exports = class extends Command {
constructor(...args) {
super(...args, {
requiredPermissions: ["USE_EXTERNAL_EMOJIS", "EMBED_LINKS"],
permissionLevel: 3,
runIn: ["text"],
description: language => language.get("COMMAND_CASE_DESCRIPTION"),
usage: "<case:integer>"
});
}
async run(msg, [selected]) {
const log = msg.guild.settings.get("modlogs")[selected];
if (!log) return msg.send(`${this.client.emotes.cross} ${msg.author}, That case could not be found, please try another ID.`);
const [user, moderator] = await Promise.all([
this.client.users.fetch(log.user),
this.client.users.fetch(log.moderator)
]);
return msg.sendEmbed(new MessageEmbed()
.setDescription([
`❯ **User**: ${user.tag} (${user.id})`,
`❯ **Moderator**: ${moderator.tag} (${moderator.id})`,
`❯ **Reason**: ${log.reason || `No Reason Specified. Use \`${msg.guild.settings.get("prefix")}reason ${log.case}\` to claim this log.`}`
].join("\n"))
.setTimestamp(log.timestamp)
.setFooter("PenguBot.com - Case Date")
.setAuthor(`Case: ${log.case}`, this.client.user.displayAvatarURL())
.setColor("#52c6ff"));
}
};
================================================
FILE: src/commands/Moderation/history.js
================================================
const { Command, MessageEmbed } = require("../../index");
module.exports = class extends Command {
constructor(...args) {
super(...args, {
requiredPermissions: ["USE_EXTERNAL_EMOJIS", "EMBED_LINKS"],
permissionLevel: 3,
runIn: ["text"],
description: language => language.get("COMMAND_HISTORY_DESCRIPTION"),
usage: "<user:username>"
});
}
async run(msg, [user]) {
const userlogs = msg.guild.settings.get("modlogs").filter(log => log.user === user.id);
if (!userlogs) return msg.send(`${this.client.emotes.cross} ***No history for this user could be found in the mod logs.***`);
const actions = {
ban: 0,
unban: 0,
softban: 0,
kick: 0,
warn: 0,
mute: 0,
unmute: 0
};
for (const log of userlogs) actions[log.type]++;
return msg.sendEmbed(new MessageEmbed()
.setDescription([
`❯ **User**: ${user.tag} (${user.id})`,
`❯ **Ban**: ${actions.ban}`,
`❯ **Unban**: ${actions.unban}`,
`❯ **Mute**: ${actions.mute}`,
`❯ **Unmute**: ${actions.unmute}`,
`❯ **Warn**: ${actions.warn}`,
`❯ **Kick**: ${actions.kick}`
].join("\n"))
.setTimestamp()
.setFooter("PenguBot.com")
.setAuthor(`User History`, this.client.user.displayAvatarURL())
.setColor("#52c6ff"));
}
};
================================================
FILE: src/commands/Moderation/kick.js
================================================
const { Command, ModLog } = require("../../index");
module.exports = class extends Command {
constructor(...args) {
super(...args, {
runIn: ["text"],
cooldown: 10,
aliases: ["kickmember"],
permissionLevel: 5,
requiredPermissions: ["USE_EXTERNAL_EMOJIS", "KICK_MEMBERS"],
description: language => language.get("COMMAND_KICK_DESCRIPTION"),
quotedStringSupport: false,
usage: "<member:membername> [reason:string] [...]",
usageDelim: " ",
extendedHelp: "No extended help available."
});
}
async run(msg, [member, ...reason]) {
reason = reason ? reason.join(" ") : null;
if (member.id === msg.author.id) return msg.reply(`${this.client.emotes.cross} ***${msg.language.get("MESSAGE_KICK_YOURSELF")}***`);
if (member.id === this.client.user.id) return msg.reply(`${this.client.emotes.cross} ***${msg.language.get("MESSAGE_KICK_PENGU")}***`);
if (member.roles.highest.position >= msg.member.roles.highest.position) {
return msg.send(`${this.client.emotes.cross} ***Target member is higher in role hierarchy than you.***`);
} else if (member.kickable === false) {
return msg.send(`${this.client.emotes.cross} ***${msg.language.get("MESSAGE_KICK_CANT")}***`);
}
await member.kick(reason)
.catch(e => msg.reply(`${this.client.emotes.cross} ***There was an error: ${e}***`));
if (msg.guild.settings.get("toggles.modlogs")) {
await new ModLog(msg.guild)
.setType("kick")
.setModerator(msg.author)
.setUser(member.user)
.setReason(reason)
.send();
}
return msg.sendMessage(`${this.client.emotes.check} ***${member.user.tag} ${msg.language.get("MESSAGE_KICKED")}***`);
}
};
================================================
FILE: src/commands/Moderation/mute.js
================================================
/* eslint-disable no-unused-expressions */
const { Command, ModLog, Duration, Permissions: { FLAGS } } = require("../../index");
module.exports = class extends Command {
constructor(...args) {
super(...args, {
runIn: ["text"],
cooldown: 8,
aliases: ["togglemute", "unmute"],
permissionLevel: 3,
requiredPermissions: ["USE_EXTERNAL_EMOJIS"],
description: language => language.get("COMMAND_MUTE_DESCRPTION"),
usage: "<member:membername> [reason:string] [...]",
extendedHelp: "No extended help available."
});
}
async run(msg, [member, ...reason]) {
reason = reason ? reason.join(" ") : null;
if (member.id === msg.author.id) return msg.reply(`${this.client.emotes.cross} ***You can not mute yourself...***`);
if (member.id === this.client.user.id) return msg.reply(`${this.client.emotes.cross} ***Why would you want to mute Pengu?***`);
const roleID = await this.dbQueryFetch(msg);
if (!roleID || !msg.guild.roles.cache.has(roleID)) await this.createRole(msg);
const role = await msg.guild.roles.fetch(await this.dbQueryFetch(msg)).catch(() => null);
if (!role) return msg.sendMessage("There was an error, I couldn't find the Muted role! Please try again or contact us at: https://discord.gg/u8WYw5r");
const myRole = msg.guild.me.roles.highest;
if (role.position > myRole.positon) return msg.sendMessage(`${this.client.emotes.cross} ***The \`PENGUMUTED\` role is above my role in the hierarchy, please change the order and try again.***`);
const highestRole = member.roles.highest;
if (myRole.position < highestRole.positon) return msg.sendMessage(`${this.client.emotes.cross} ***That user has a role above my role in the hierarchy, please change the order and try again.***`);
const time = msg.flagArgs.time || msg.flagArgs.duration || msg.flagArgs.tempmute;
let duration = null;
time ? duration = new Duration(time) : null;
if (time && (duration.offset < 1 || duration.offset > 2592000000)) throw `${this.client.emotes.cross} ***Duration is invalid, try something like 1 hour, 1 day, etc. Maximum 30 days.***`;
if (member.roles.cache.has(role.id)) {
await member.roles.remove(role.id)
.catch(e => msg.reply(`${this.client.emotes.cross} ***There was an error: ${e}***`));
if (msg.guild.settings.get("toggles.modlogs")) {
await new ModLog(msg.guild)
.setType("unmute")
.setModerator(msg.author)
.setReason(reason)
.setUser(member.user)
.send();
}
return msg.sendMessage(`${this.client.emotes.check} ***${member.user.tag} ${msg.language.get("MESSAGE_UNMUTED")}***`);
} else {
await member.roles.add(role.id)
.catch(e => msg.reply(`${this.client.emotes.cross} ***There was an error: ${e}***`));
if (msg.guild.settings.get("toggles.modlogs")) {
await new ModLog(msg.guild)
.setType("mute")
.setModerator(msg.author)
.setReason(reason)
.setUser(member.user)
.send();
}
if (time) await this.client.schedule.create("timedMute", new Duration(time), { data: { guildID: msg.guild.id, userID: member.id }, catchUp: true });
return msg.sendMessage(`${this.client.emotes.check} ***${member.user.tag} ${msg.language.get("MESSAGE_MUTED")}${time ? ` Temp Mute for: ${time}` : ""}***`);
}
}
async createRole(msg) {
if (!msg.guild.me.permissions.has("MANAGE_ROLES")) throw msg.sendMessage(`${this.client.emotes.cross} ***I do not have \`MANAGE ROLES\` permissions. Please assign the permission and try again.***`);
const newRole = await msg.guild.roles.create({
data: {
name: "PENGUMUTED",
permissions: [FLAGS.VIEW_CHANNEL]
}
}).catch(() => null);
if (!newRole) throw msg.reply(`There was an error. Make sure Pengu has appropriate permissions and try again.`);
await this.dbQueryUpdate(msg, newRole.id);
const promises = [];
for (const channel of msg.guild.channels.cache.values()) promises.push(channel.updateOverwrite(newRole, { SEND_MESSAGES: false, ADD_REACTIONS: false, CONNECT: false }, `Mute Command Executed By ${msg.author.tag}`));
// Catching for channels that don't allow permission
await Promise.all(promises).catch(() => null);
}
async dbQueryUpdate(msg, roleID) {
const r = this.client.providers.default.db;
const query = await r.table("guilds").get(msg.guild.id)
.update({ roles: { muted: roleID } })
.run()
.catch(e => {
console.error(`${this.name} error:\n${e}`);
throw `There was an error, please contact us on our support server: <https://pengubot.com/support>\n${e}`;
});
await msg.guild.settings.sync(true);
return query;
}
async dbQueryFetch(msg) {
const r = this.client.providers.default.db;
const query = await r.table("guilds").get(msg.guild.id)
.getField("roles")
.run()
.catch(e => {
console.error(`${this.name} error:\n${e}`);
throw `There was an error, please contact us on our support server: <https://pengubot.com/support>\n${e}`;
});
i
gitextract_nufrysfo/
├── .eslintrc.js
├── .github/
│ ├── CONTRIBUTING.md
│ ├── FUNDING.yml
│ ├── ISSUE_TEMPLATE/
│ │ ├── Bug_report.md
│ │ └── Feature_request.md
│ ├── PULL_REQUEST_TEMPLATE.md
│ └── workflows/
│ └── test.yml
├── .gitignore
├── Dockerfile
├── LICENSE
├── README.md
├── docker-compose.yml
├── package.json
└── src/
├── PenguBot.js
├── arguments/
│ ├── channelname.js
│ ├── membername.js
│ ├── rolename.js
│ └── username.js
├── commands/
│ ├── Developer/
│ │ ├── eval.js
│ │ ├── exec.js
│ │ ├── setgame.js
│ │ └── togglepatronguild.js
│ ├── Game Statistics/
│ │ ├── clashofclans.js
│ │ ├── csgo.js
│ │ ├── fortnite.js
│ │ └── osu.js
│ ├── Games/
│ │ ├── 8ball.js
│ │ ├── rps.js
│ │ └── slots.js
│ ├── General/
│ │ └── Chat Bot Info/
│ │ ├── donate.js
│ │ ├── help.js
│ │ ├── info.js
│ │ ├── nodeinfo.js
│ │ ├── settings.js
│ │ ├── stats.js
│ │ ├── support.js
│ │ └── upvote.js
│ ├── Images/
│ │ ├── cat.js
│ │ ├── cookie.js
│ │ ├── cuddle.js
│ │ ├── dog.js
│ │ ├── feed.js
│ │ ├── fox.js
│ │ ├── hug.js
│ │ ├── kiss.js
│ │ ├── meme.js
│ │ ├── pat.js
│ │ ├── pengu.js
│ │ ├── poke.js
│ │ ├── punch.js
│ │ ├── randomcomic.js
│ │ ├── slap.js
│ │ ├── tickle.js
│ │ └── wholesome.js
│ ├── Jokes and Stuff/
│ │ ├── chucknorris.js
│ │ ├── compliment.js
│ │ ├── dadjoke.js
│ │ ├── dice.js
│ │ ├── fml.js
│ │ ├── insult.js
│ │ ├── randomfact.js
│ │ ├── trump.js
│ │ └── yomomma.js
│ ├── Management/
│ │ ├── Automod/
│ │ │ ├── manageautomod.js
│ │ │ └── toggleinvites.js
│ │ ├── Autoroles/
│ │ │ ├── addautoroles.js
│ │ │ └── toggleautoroles.js
│ │ ├── Custom Commands/
│ │ │ ├── createcmd.js
│ │ │ ├── deletecmd.js
│ │ │ ├── listcmds.js
│ │ │ ├── togglecustomcmds.js
│ │ │ └── updatecmd.js
│ │ ├── Level Roles/
│ │ │ ├── listlevelroles.js
│ │ │ ├── managelevelroles.js
│ │ │ └── togglelevelroles.js
│ │ ├── Logging/
│ │ │ ├── log.js
│ │ │ ├── loggingchannel.js
│ │ │ └── modlogs.js
│ │ ├── Self Roles/
│ │ │ ├── manageselfroles.js
│ │ │ ├── selfroles.js
│ │ │ └── toggleselfroles.js
│ │ ├── Starboard/
│ │ │ ├── starboard.js
│ │ │ ├── starboardchannel.js
│ │ │ ├── starsrequired.js
│ │ │ └── togglestarboard.js
│ │ └── Welcome & Leave/
│ │ ├── setleavechannel.js
│ │ ├── setleavemsg.js
│ │ ├── setwelcomechannel.js
│ │ ├── setwelcomemsg.js
│ │ ├── toggleleave.js
│ │ └── togglewelcome.js
│ ├── Manipulation/
│ │ ├── achievement.js
│ │ ├── approved.js
│ │ ├── batslap.js
│ │ ├── beautiful.js
│ │ ├── changemymind.js
│ │ ├── facepalm.js
│ │ ├── garbage.js
│ │ ├── illegal.js
│ │ ├── lio.js
│ │ ├── missing.js
│ │ ├── rejected.js
│ │ ├── respect.js
│ │ ├── snap.js
│ │ ├── superpunch.js
│ │ ├── tattoo.js
│ │ ├── tinder.js
│ │ ├── triggered.js
│ │ ├── vault.js
│ │ └── wanted.js
│ ├── Moderation/
│ │ ├── ban.js
│ │ ├── case.js
│ │ ├── history.js
│ │ ├── kick.js
│ │ ├── mute.js
│ │ ├── prune.js
│ │ ├── reason.js
│ │ ├── softban.js
│ │ └── warn.js
│ ├── Music/
│ │ └── music.js
│ ├── Profiles/
│ │ ├── backgrounds.js
│ │ ├── daily.js
│ │ ├── leaderboard.js
│ │ ├── levelup.js
│ │ ├── managexp.js
│ │ ├── profile.js
│ │ ├── rank.js
│ │ ├── rep.js
│ │ ├── snowflakes.js
│ │ └── title.js
│ ├── Settings/
│ │ ├── disablecmd.js
│ │ ├── manageadmin.js
│ │ ├── managedj.js
│ │ ├── managemod.js
│ │ ├── managestaff.js
│ │ ├── prefix.js
│ │ ├── setlanguage.js
│ │ └── togglecategory.js
│ └── Utilities/
│ ├── afk.js
│ ├── avatar.js
│ ├── choose.js
│ ├── covid.js
│ ├── emote.js
│ ├── guild.js
│ ├── lmgtfy.js
│ ├── poll.js
│ ├── quote.js
│ ├── reddit.js
│ ├── remind.js
│ ├── roleinfo.js
│ ├── say.js
│ ├── shorten.js
│ ├── translate.js
│ ├── twstats.js
│ ├── urban.js
│ ├── userinfo.js
│ ├── weather.js
│ └── ytstats.js
├── events/
│ ├── channelCreate.js
│ ├── channelDelete.js
│ ├── commandError.js
│ ├── commandUnknown.js
│ ├── debug.js
│ ├── disconnect.js
│ ├── eventError.js
│ ├── guildBanAdd.js
│ ├── guildBanRemove.js
│ ├── guildCreate.js
│ ├── guildDelete.js
│ ├── guildMemberAdd.js
│ ├── guildMemberRemove.js
│ ├── klasaReady.js
│ ├── messageDelete.js
│ ├── messageDeleteBulk.js
│ ├── messageReactionAdd.js
│ ├── messageReactionRemove.js
│ ├── messageUpdate.js
│ ├── reconnecting.js
│ ├── resumed.js
│ ├── roleCreate.js
│ ├── roleDelete.js
│ └── shardError.js
├── extendables/
│ ├── fetchURL.js
│ └── prompt.js
├── finalizers/
│ └── commandCounter.js
├── functions/
│ ├── friendlyDuration.js
│ ├── images.js
│ ├── isPatron.js
│ ├── isUpvoter.js
│ ├── randomNumber.js
│ └── scrapeSubreddit.js
├── index.js
├── inhibitors/
│ ├── disabledGroup.js
│ ├── patronOnly.js
│ ├── requireDJ.js
│ ├── requireMusic.js
│ └── upvoterOnly.js
├── languages/
│ ├── en-US.js
│ ├── es-ES.js
│ ├── fr-FR.js
│ ├── it-IT.js
│ └── sar-IT.js
├── lib/
│ ├── constants/
│ │ ├── facts.json
│ │ ├── nsfw/
│ │ │ └── subreddits.json
│ │ └── yomomma.json
│ ├── structures/
│ │ ├── KlasaCommand.js
│ │ ├── ModLog.js
│ │ ├── PenguClient.js
│ │ ├── PenguGuild.js
│ │ ├── PenguMember.js
│ │ ├── PenguMemberManager.js
│ │ ├── ServerLog.js
│ │ ├── permissionLevels.js
│ │ └── schemas/
│ │ ├── defaultClientSchema.js
│ │ ├── defaultGuildSchema.js
│ │ ├── defaultMemberSchema.js
│ │ └── defaultUserSchema.js
│ ├── tags/
│ │ ├── getjson.js
│ │ └── sendchannel.js
│ └── util/
│ └── Util.js
├── main.js
├── middlewares/
│ ├── headers.js
│ └── json.js
├── monitors/
│ ├── afk.js
│ ├── antiinvites.js
│ ├── memberProfiles.js
│ ├── perspectivemod.js
│ └── profiles.js
├── providers/
│ └── rethinkdb.js
├── routes/
│ ├── application.js
│ ├── dblHook.js
│ ├── kdhGuild.js
│ ├── pieces.js
│ └── syncdb.js
└── tasks/
├── datadog.js
├── memorySweeper.js
├── reminder.js
├── stats.js
├── tempMute.js
└── timedBan.js
SYMBOL INDEX (515 symbols across 216 files)
FILE: src/PenguBot.js
method launch (line 14) | launch() {
FILE: src/arguments/channelname.js
method run (line 7) | async run(arg, possible, msg) {
method resolveChannel (line 14) | resolveChannel(arg, guild) {
FILE: src/arguments/membername.js
constant USER_REGEXP (line 3) | const USER_REGEXP = Argument.regex.userOrMember;
method run (line 7) | async run(arg, possible, msg) {
method resolveMember (line 35) | resolveMember(query, guild) {
FILE: src/arguments/rolename.js
constant ROLE_REGEXP (line 3) | const ROLE_REGEXP = Argument.regex.role;
method run (line 7) | async run(arg, possible, msg) {
method resolveRole (line 32) | resolveRole(query, guild) {
FILE: src/arguments/username.js
constant USER_REGEXP (line 3) | const USER_REGEXP = Argument.regex.userOrMember;
method run (line 7) | async run(arg, possible, msg) {
method resolveUser (line 32) | resolveUser(query, guild) {
FILE: src/commands/Developer/eval.js
method constructor (line 6) | constructor(...args) {
method run (line 18) | async run(msg, [code]) {
method handleMessage (line 32) | async handleMessage(msg, options, { success, result, time, footer }) {
method getTypeOutput (line 65) | async getTypeOutput(msg, options) {
method timedEval (line 76) | timedEval(msg, code, flagTime) {
method eval (line 89) | async eval(msg, code) {
method formatTime (line 124) | formatTime(syncTime, asyncTime) {
FILE: src/commands/Developer/exec.js
method constructor (line 5) | constructor(...args) {
method run (line 16) | async run(msg, [input]) {
FILE: src/commands/Developer/setgame.js
method constructor (line 5) | constructor(...args) {
method text (line 17) | async text(msg, [...game]) {
method stream (line 22) | async stream(msg, [...game]) {
FILE: src/commands/Developer/togglepatronguild.js
method constructor (line 5) | constructor(...args) {
method run (line 15) | async run(msg, [guild]) {
FILE: src/commands/Game Statistics/clashofclans.js
method constructor (line 5) | constructor(...args) {
method run (line 16) | async run(msg, [tag]) {
FILE: src/commands/Game Statistics/csgo.js
method constructor (line 5) | constructor(...args) {
method run (line 16) | async run(msg, [username]) {
FILE: src/commands/Game Statistics/fortnite.js
method constructor (line 5) | constructor(...args) {
method run (line 18) | async run(msg, [platform, username]) {
FILE: src/commands/Game Statistics/osu.js
method constructor (line 5) | constructor(...args) {
method run (line 16) | async run(msg, [username]) {
FILE: src/commands/Games/8ball.js
method constructor (line 13) | constructor(...args) {
method run (line 23) | async run(msg) {
FILE: src/commands/Games/rps.js
method constructor (line 6) | constructor(...args) {
method run (line 17) | async run(msg, [move]) {
FILE: src/commands/Games/slots.js
method constructor (line 7) | constructor(...args) {
method run (line 18) | async run(msg, [Snowflakes = 1]) {
FILE: src/commands/General/Chat Bot Info/donate.js
method constructor (line 6) | constructor(...args) {
method run (line 15) | async run(msg) {
FILE: src/commands/General/Chat Bot Info/help.js
method constructor (line 5) | constructor(...args) {
method run (line 20) | async run(msg, [cmd]) {
FILE: src/commands/General/Chat Bot Info/info.js
method constructor (line 6) | constructor(...args) {
method run (line 15) | async run(msg) {
FILE: src/commands/General/Chat Bot Info/nodeinfo.js
method constructor (line 5) | constructor(...args) {
method run (line 15) | async run(msg) {
FILE: src/commands/General/Chat Bot Info/settings.js
method constructor (line 5) | constructor(...args) {
method run (line 21) | async run(msg, [type, ...params]) {
method general (line 46) | async general(msg, [setting, value]) {
method music (line 102) | async music(msg, [setting, ...value]) {
method autoroles (line 135) | async autoroles(msg, [setting]) {
method levelroles (line 181) | async levelroles(msg, [setting]) {
method selfroles (line 214) | async selfroles(msg, [setting]) {
method automod (line 246) | async automod(msg, [setting]) {
method logs (line 277) | async logs(msg, [setting, ...value]) {
method moderation (line 322) | async moderation(msg) {
method starboard (line 339) | async starboard(msg, [setting, ...value]) {
method customcommands (line 384) | async customcommands(msg, [setting]) {
method greetings (line 414) | async greetings(msg, [setting, ...value]) {
FILE: src/commands/General/Chat Bot Info/stats.js
method constructor (line 5) | constructor(...args) {
method run (line 13) | async run(msg) {
FILE: src/commands/General/Chat Bot Info/support.js
method constructor (line 5) | constructor(...args) {
method run (line 13) | async run(msg) {
FILE: src/commands/General/Chat Bot Info/upvote.js
method constructor (line 6) | constructor(...args) {
method run (line 14) | async run(msg) {
FILE: src/commands/Images/cat.js
method constructor (line 5) | constructor(...args) {
method run (line 15) | async run(msg) {
FILE: src/commands/Images/cookie.js
method constructor (line 13) | constructor(...args) {
method run (line 23) | async run(msg, [user]) {
FILE: src/commands/Images/cuddle.js
method constructor (line 5) | constructor(...args) {
method run (line 16) | async run(msg, [user]) {
FILE: src/commands/Images/dog.js
method constructor (line 5) | constructor(...args) {
method run (line 15) | async run(msg) {
FILE: src/commands/Images/feed.js
method constructor (line 5) | constructor(...args) {
method run (line 16) | async run(msg, [user]) {
FILE: src/commands/Images/fox.js
method constructor (line 5) | constructor(...args) {
method run (line 15) | async run(msg) {
FILE: src/commands/Images/hug.js
method constructor (line 5) | constructor(...args) {
method run (line 16) | async run(msg, [user]) {
FILE: src/commands/Images/kiss.js
method constructor (line 5) | constructor(...args) {
method run (line 16) | async run(msg, [user]) {
FILE: src/commands/Images/meme.js
method constructor (line 6) | constructor(...args) {
method run (line 16) | async run(msg) {
FILE: src/commands/Images/pat.js
method constructor (line 5) | constructor(...args) {
method run (line 16) | async run(msg, [user]) {
FILE: src/commands/Images/pengu.js
method constructor (line 16) | constructor(...args) {
method run (line 26) | async run(msg) {
FILE: src/commands/Images/poke.js
method constructor (line 5) | constructor(...args) {
method run (line 16) | async run(msg, [user]) {
FILE: src/commands/Images/punch.js
method constructor (line 14) | constructor(...args) {
method run (line 25) | async run(msg, [user]) {
FILE: src/commands/Images/randomcomic.js
method constructor (line 6) | constructor(...args) {
method run (line 16) | async run(msg) {
FILE: src/commands/Images/slap.js
method constructor (line 5) | constructor(...args) {
method run (line 16) | async run(msg, [user]) {
FILE: src/commands/Images/tickle.js
method constructor (line 5) | constructor(...args) {
method run (line 16) | async run(msg, [user]) {
FILE: src/commands/Images/wholesome.js
constant SUB_REDDITS (line 3) | const SUB_REDDITS = ["wholesome", "aww", "AnimalsBeingBros"];
method constructor (line 6) | constructor(...args) {
method run (line 17) | async run(msg) {
FILE: src/commands/Jokes and Stuff/chucknorris.js
method constructor (line 5) | constructor(...args) {
method run (line 14) | async run(msg) {
FILE: src/commands/Jokes and Stuff/compliment.js
method constructor (line 21) | constructor(...args) {
method run (line 30) | async run(msg, [user]) {
FILE: src/commands/Jokes and Stuff/dadjoke.js
method constructor (line 5) | constructor(...args) {
method run (line 15) | async run(msg) {
FILE: src/commands/Jokes and Stuff/dice.js
method constructor (line 5) | constructor(...args) {
method run (line 15) | async run(msg, [sides = 6]) {
FILE: src/commands/Jokes and Stuff/fml.js
method constructor (line 6) | constructor(...args) {
method run (line 16) | async run(msg) {
FILE: src/commands/Jokes and Stuff/insult.js
method constructor (line 8) | constructor(...args) {
method run (line 18) | async run(msg, [user]) {
FILE: src/commands/Jokes and Stuff/randomfact.js
method constructor (line 6) | constructor(...args) {
method run (line 16) | async run(msg) {
FILE: src/commands/Jokes and Stuff/trump.js
method constructor (line 5) | constructor(...args) {
method run (line 16) | async run(msg, [user = msg.author]) {
FILE: src/commands/Jokes and Stuff/yomomma.js
method constructor (line 6) | constructor(...args) {
method run (line 16) | async run(msg) {
FILE: src/commands/Management/Automod/manageautomod.js
method constructor (line 5) | constructor(...args) {
method toggle (line 19) | async toggle(msg, [filter]) {
method threshold (line 40) | async threshold(msg, [filter, threshold]) {
FILE: src/commands/Management/Automod/toggleinvites.js
method constructor (line 5) | constructor(...args) {
method run (line 18) | async run(msg) {
FILE: src/commands/Management/Autoroles/addautoroles.js
method constructor (line 5) | constructor(...args) {
method run (line 18) | async run(msg, [role]) {
FILE: src/commands/Management/Autoroles/toggleautoroles.js
method constructor (line 5) | constructor(...args) {
method run (line 17) | async run(msg) {
FILE: src/commands/Management/Custom Commands/createcmd.js
method constructor (line 5) | constructor(...args) {
method run (line 19) | async run(msg, [name, ...content]) {
FILE: src/commands/Management/Custom Commands/deletecmd.js
method constructor (line 5) | constructor(...args) {
method run (line 18) | async run(msg, [name]) {
FILE: src/commands/Management/Custom Commands/listcmds.js
method constructor (line 5) | constructor(...args) {
method run (line 16) | async run(msg) {
FILE: src/commands/Management/Custom Commands/togglecustomcmds.js
method constructor (line 5) | constructor(...args) {
method run (line 17) | async run(msg) {
FILE: src/commands/Management/Custom Commands/updatecmd.js
method constructor (line 5) | constructor(...args) {
method run (line 19) | async run(msg, [name, ...content]) {
FILE: src/commands/Management/Level Roles/listlevelroles.js
method constructor (line 5) | constructor(...args) {
method run (line 16) | async run(msg) {
FILE: src/commands/Management/Level Roles/managelevelroles.js
method constructor (line 5) | constructor(...args) {
method add (line 19) | async add(msg, [role, level]) {
method remove (line 32) | async remove(msg, [role]) {
FILE: src/commands/Management/Level Roles/togglelevelroles.js
method constructor (line 5) | constructor(...args) {
method run (line 17) | async run(msg) {
FILE: src/commands/Management/Logging/log.js
method constructor (line 5) | constructor(...args) {
method run (line 18) | async run(msg, [Option]) {
method update (line 40) | async update(key, msg) {
FILE: src/commands/Management/Logging/loggingchannel.js
method constructor (line 5) | constructor(...args) {
method run (line 18) | async run(msg, [Channel = msg.channel]) {
FILE: src/commands/Management/Logging/modlogs.js
method constructor (line 5) | constructor(...args) {
method channel (line 20) | async channel(msg, [Channel = msg.channel]) {
method toggle (line 26) | async toggle(msg) {
FILE: src/commands/Management/Self Roles/manageselfroles.js
method constructor (line 5) | constructor(...args) {
method run (line 18) | async run(msg, [role]) {
FILE: src/commands/Management/Self Roles/selfroles.js
method constructor (line 5) | constructor(...args) {
method list (line 20) | async list(msg) {
method add (line 37) | async add(msg, [role]) {
method remove (line 52) | async remove(msg, [role]) {
FILE: src/commands/Management/Self Roles/toggleselfroles.js
method constructor (line 5) | constructor(...args) {
method run (line 17) | async run(msg) {
FILE: src/commands/Management/Starboard/starboard.js
method constructor (line 5) | constructor(...args) {
method run (line 18) | async run(msg, [Message]) {
method checkAttachments (line 56) | checkAttachments(attachment) {
FILE: src/commands/Management/Starboard/starboardchannel.js
method constructor (line 5) | constructor(...args) {
method run (line 19) | async run(msg, [channel = msg.channel]) {
FILE: src/commands/Management/Starboard/starsrequired.js
method constructor (line 5) | constructor(...args) {
method run (line 18) | async run(msg, [Stars]) {
FILE: src/commands/Management/Starboard/togglestarboard.js
method constructor (line 5) | constructor(...args) {
method run (line 17) | async run(msg) {
FILE: src/commands/Management/Welcome & Leave/setleavechannel.js
method constructor (line 5) | constructor(...args) {
method run (line 18) | async run(msg, [channel = msg.channel]) {
method dbQuery (line 24) | async dbQuery(msg, channel) {
FILE: src/commands/Management/Welcome & Leave/setleavemsg.js
method constructor (line 5) | constructor(...args) {
method run (line 18) | async run(msg, [message]) {
FILE: src/commands/Management/Welcome & Leave/setwelcomechannel.js
method constructor (line 5) | constructor(...args) {
method run (line 18) | async run(msg, [channel = msg.channel]) {
method dbQuery (line 24) | async dbQuery(msg, channel) {
FILE: src/commands/Management/Welcome & Leave/setwelcomemsg.js
method constructor (line 5) | constructor(...args) {
method run (line 18) | async run(msg, [message]) {
FILE: src/commands/Management/Welcome & Leave/toggleleave.js
method constructor (line 5) | constructor(...args) {
method run (line 17) | async run(msg) {
FILE: src/commands/Management/Welcome & Leave/togglewelcome.js
method constructor (line 5) | constructor(...args) {
method run (line 17) | async run(msg) {
FILE: src/commands/Manipulation/achievement.js
method constructor (line 5) | constructor(...args) {
method run (line 16) | async run(msg, [achievement]) {
FILE: src/commands/Manipulation/approved.js
method constructor (line 5) | constructor(...args) {
method run (line 15) | async run(msg, [approvewho = msg.author]) {
FILE: src/commands/Manipulation/batslap.js
method constructor (line 5) | constructor(...args) {
method run (line 16) | async run(msg, [user]) {
FILE: src/commands/Manipulation/beautiful.js
method constructor (line 5) | constructor(...args) {
method run (line 16) | async run(msg, [user = msg.author]) {
FILE: src/commands/Manipulation/changemymind.js
method constructor (line 5) | constructor(...args) {
method run (line 16) | async run(msg, [text]) {
FILE: src/commands/Manipulation/facepalm.js
method constructor (line 5) | constructor(...args) {
method run (line 15) | async run(msg, [user = msg.author]) {
FILE: src/commands/Manipulation/garbage.js
method constructor (line 5) | constructor(...args) {
method run (line 16) | async run(msg, [garbagewho = msg.author]) {
FILE: src/commands/Manipulation/illegal.js
method constructor (line 5) | constructor(...args) {
method run (line 16) | async run(msg, [name]) {
FILE: src/commands/Manipulation/lio.js
method constructor (line 5) | constructor(...args) {
method run (line 16) | async run(msg, [user = msg.author]) {
FILE: src/commands/Manipulation/missing.js
method constructor (line 5) | constructor(...args) {
method run (line 16) | async run(msg, [user = msg.author]) {
FILE: src/commands/Manipulation/rejected.js
method constructor (line 5) | constructor(...args) {
method run (line 15) | async run(msg, [rejectwho = msg.author]) {
FILE: src/commands/Manipulation/respect.js
method constructor (line 5) | constructor(...args) {
method run (line 16) | async run(msg, [user = msg.author]) {
FILE: src/commands/Manipulation/snap.js
method constructor (line 5) | constructor(...args) {
method run (line 16) | async run(msg, [snaptext]) {
FILE: src/commands/Manipulation/superpunch.js
method constructor (line 5) | constructor(...args) {
method run (line 16) | async run(msg, [user]) {
FILE: src/commands/Manipulation/tattoo.js
method constructor (line 5) | constructor(...args) {
method run (line 16) | async run(msg, [user = msg.author]) {
FILE: src/commands/Manipulation/tinder.js
method constructor (line 5) | constructor(...args) {
method run (line 15) | async run(msg, [matchwith]) {
FILE: src/commands/Manipulation/triggered.js
method constructor (line 5) | constructor(...args) {
method run (line 16) | async run(msg, [user = msg.author]) {
FILE: src/commands/Manipulation/vault.js
method constructor (line 5) | constructor(...args) {
method run (line 15) | async run(msg, [user = msg.author]) {
FILE: src/commands/Manipulation/wanted.js
method constructor (line 5) | constructor(...args) {
method run (line 16) | async run(msg, [user = msg.author]) {
FILE: src/commands/Moderation/ban.js
method constructor (line 6) | constructor(...args) {
method run (line 22) | async run(msg, [user, ...reason]) {
FILE: src/commands/Moderation/case.js
method constructor (line 5) | constructor(...args) {
method run (line 15) | async run(msg, [selected]) {
FILE: src/commands/Moderation/history.js
method constructor (line 5) | constructor(...args) {
method run (line 15) | async run(msg, [user]) {
FILE: src/commands/Moderation/kick.js
method constructor (line 5) | constructor(...args) {
method run (line 20) | async run(msg, [member, ...reason]) {
FILE: src/commands/Moderation/mute.js
method constructor (line 6) | constructor(...args) {
method run (line 19) | async run(msg, [member, ...reason]) {
method createRole (line 74) | async createRole(msg) {
method dbQueryUpdate (line 93) | async dbQueryUpdate(msg, roleID) {
method dbQueryFetch (line 107) | async dbQueryFetch(msg) {
FILE: src/commands/Moderation/prune.js
method constructor (line 5) | constructor(...args) {
method run (line 19) | async run(msg, [limit = 10, filter = null]) {
method getFilter (line 35) | getFilter(msg, filter, user) {
FILE: src/commands/Moderation/reason.js
method constructor (line 5) | constructor(...args) {
method run (line 16) | async run(msg, [selected, ...reason]) {
FILE: src/commands/Moderation/softban.js
method constructor (line 5) | constructor(...args) {
method run (line 21) | async run(msg, [user, ...reason]) {
FILE: src/commands/Moderation/warn.js
method constructor (line 5) | constructor(...args) {
method run (line 16) | async run(msg, [member, ...reason]) {
FILE: src/commands/Music/music.js
method constructor (line 6) | constructor(...args) {
method run (line 15) | async run(msg) {
FILE: src/commands/Profiles/backgrounds.js
method constructor (line 16) | constructor(...args) {
method view (line 26) | async view(msg, [key]) {
method buy (line 70) | async buy(msg, [key]) {
method change (line 97) | async change(msg, [key]) {
method process (line 125) | async process(msg, name, price) {
method changeBG (line 132) | async changeBG(msg, name) {
method checkOwnership (line 139) | checkOwnership(msg, name) {
method compareBackground (line 144) | compareBackground(msg, name) {
method checkBalance (line 149) | checkBalance(msg, price) {
method updateOwnership (line 154) | async updateOwnership(msg, name, price) {
method updateBG (line 159) | async updateBG(msg, name) {
FILE: src/commands/Profiles/daily.js
method constructor (line 5) | constructor(...args) {
method run (line 18) | async run(msg, [user = msg.author]) {
FILE: src/commands/Profiles/leaderboard.js
method constructor (line 5) | constructor(...args) {
method run (line 15) | async run(msg, [Page]) {
FILE: src/commands/Profiles/levelup.js
method constructor (line 5) | constructor(...args) {
method toggle (line 19) | async toggle(msg) {
method type (line 29) | async type(msg, [type]) {
FILE: src/commands/Profiles/managexp.js
method constructor (line 5) | constructor(...args) {
method set (line 19) | async set(msg, [member, amount]) {
method add (line 25) | async add(msg, [member, amount]) {
method reset (line 31) | async reset(msg, [member]) {
FILE: src/commands/Profiles/profile.js
method constructor (line 13) | constructor(...args) {
method run (line 24) | async run(msg, [user = msg.author]) {
method createImage (line 31) | async createImage(user) {
FILE: src/commands/Profiles/rank.js
method constructor (line 13) | constructor(...args) {
method run (line 25) | async run(msg, [user = msg.member]) {
method createImage (line 32) | async createImage(member) {
FILE: src/commands/Profiles/rep.js
method constructor (line 5) | constructor(...args) {
method run (line 18) | async run(msg, [user]) {
FILE: src/commands/Profiles/snowflakes.js
method constructor (line 5) | constructor(...args) {
method run (line 19) | async run(msg, [user, amount]) {
FILE: src/commands/Profiles/title.js
method constructor (line 5) | constructor(...args) {
method run (line 18) | async run(msg, [title]) {
FILE: src/commands/Settings/disablecmd.js
method constructor (line 5) | constructor(...args) {
method run (line 20) | async run(msg, [cmd]) {
method dbQuery (line 30) | async dbQuery(msg, cmd, action) {
FILE: src/commands/Settings/manageadmin.js
method constructor (line 6) | constructor(...args) {
method add (line 21) | async add(msg, [memberOrRole]) {
method remove (line 43) | async remove(msg, [memberOrRole]) {
method list (line 65) | async list(msg) {
FILE: src/commands/Settings/managedj.js
method constructor (line 6) | constructor(...args) {
method add (line 21) | async add(msg, [memberOrRole]) {
method remove (line 43) | async remove(msg, [memberOrRole]) {
method list (line 65) | async list(msg) {
FILE: src/commands/Settings/managemod.js
method constructor (line 6) | constructor(...args) {
method add (line 21) | async add(msg, [memberOrRole]) {
method remove (line 43) | async remove(msg, [memberOrRole]) {
method list (line 65) | async list(msg) {
FILE: src/commands/Settings/managestaff.js
method constructor (line 6) | constructor(...args) {
method add (line 21) | async add(msg, [memberOrRole]) {
method remove (line 40) | async remove(msg, [memberOrRole]) {
method list (line 62) | async list(msg) {
FILE: src/commands/Settings/prefix.js
method constructor (line 5) | constructor(...args) {
method run (line 19) | async run(msg, [prefix]) {
FILE: src/commands/Settings/setlanguage.js
method constructor (line 5) | constructor(...args) {
method run (line 20) | async run(msg, [language]) {
method changeLanguage (line 44) | async changeLanguage(msg, language) {
FILE: src/commands/Settings/togglecategory.js
method constructor (line 5) | constructor(...args) {
method run (line 20) | async run(msg, [category]) {
method categories (line 29) | get categories() {
FILE: src/commands/Utilities/afk.js
method constructor (line 5) | constructor(...args) {
method run (line 14) | async run(msg, [reason = "No reason"]) {
FILE: src/commands/Utilities/avatar.js
method constructor (line 5) | constructor(...args) {
method run (line 18) | async run(msg, [person = msg.author]) {
FILE: src/commands/Utilities/choose.js
method constructor (line 5) | constructor(...args) {
method run (line 18) | async run(msg, choices) {
FILE: src/commands/Utilities/covid.js
method constructor (line 6) | constructor(...args) {
method run (line 15) | async run(msg, [country]) {
method getData (line 60) | async getData(route) {
method formatChange (line 67) | formatChange(number) {
FILE: src/commands/Utilities/emote.js
method constructor (line 5) | constructor(...args) {
method run (line 27) | async run(msg, [emote]) {
FILE: src/commands/Utilities/guild.js
method constructor (line 20) | constructor(...args) {
method run (line 31) | async run(msg) {
FILE: src/commands/Utilities/lmgtfy.js
method constructor (line 5) | constructor(...args) {
method run (line 18) | async run(msg, [query]) {
FILE: src/commands/Utilities/poll.js
method constructor (line 5) | constructor(...args) {
method run (line 17) | async run(msg, [title, ...options]) {
FILE: src/commands/Utilities/quote.js
method constructor (line 7) | constructor(...args) {
method run (line 18) | async run(msg, [channel = msg.channel, msgId]) {
method checkAttachments (line 32) | checkAttachments(attachment) {
FILE: src/commands/Utilities/reddit.js
method constructor (line 8) | constructor(...args) {
method run (line 20) | async run(msg, [subreddit]) {
FILE: src/commands/Utilities/remind.js
method constructor (line 5) | constructor(...args) {
method run (line 19) | async run(msg, [time, ...message]) {
FILE: src/commands/Utilities/roleinfo.js
method constructor (line 5) | constructor(...args) {
method run (line 16) | async run(msg, [role]) {
FILE: src/commands/Utilities/say.js
method constructor (line 5) | constructor(...args) {
method run (line 17) | async run(msg, [message]) {
FILE: src/commands/Utilities/shorten.js
method constructor (line 5) | constructor(...args) {
method run (line 18) | async run(msg, [link]) {
FILE: src/commands/Utilities/translate.js
method constructor (line 6) | constructor(...args) {
method run (line 14) | async run(msg, [content, language]) {
FILE: src/commands/Utilities/twstats.js
method constructor (line 7) | constructor(...args) {
method run (line 17) | async run(msg, [channel]) {
FILE: src/commands/Utilities/urban.js
method constructor (line 5) | constructor(...args) {
method run (line 15) | async run(msg, [word]) {
method getDefinition (line 27) | async getDefinition(term) {
FILE: src/commands/Utilities/userinfo.js
method constructor (line 5) | constructor(...args) {
method run (line 18) | async run(msg, [user]) {
FILE: src/commands/Utilities/weather.js
method constructor (line 12) | constructor(...args) {
method run (line 24) | async run(msg, [location]) {
method getBase (line 89) | async getBase(icon) {
FILE: src/commands/Utilities/ytstats.js
method constructor (line 5) | constructor(...args) {
method run (line 18) | async run(msg, [channel]) {
FILE: src/events/channelCreate.js
method run (line 6) | async run(channel) {
FILE: src/events/channelDelete.js
method run (line 6) | async run(channel) {
FILE: src/events/commandError.js
method run (line 6) | run(message, command, params, error) {
FILE: src/events/commandUnknown.js
method run (line 9) | async run(msg, command, prefixLength) {
method init (line 33) | async init() {
FILE: src/events/debug.js
method constructor (line 5) | constructor(...args) {
method run (line 11) | async run(info) {
FILE: src/events/disconnect.js
method run (line 5) | async run() {
FILE: src/events/eventError.js
method run (line 6) | run(event, args, error) {
FILE: src/events/guildBanAdd.js
method run (line 6) | async run(guild, user) {
FILE: src/events/guildBanRemove.js
method run (line 6) | async run(guild, user) {
FILE: src/events/guildCreate.js
method run (line 5) | async run(guild) {
FILE: src/events/guildDelete.js
method run (line 5) | async run() {
FILE: src/events/guildMemberAdd.js
method run (line 6) | async run(member) {
method welcomeMessage (line 18) | welcomeMessage(member) {
method autoroles (line 26) | autoroles(member) {
method replaceText (line 41) | replaceText(str, member) {
FILE: src/events/guildMemberRemove.js
method run (line 6) | async run(member) {
method leaveMessage (line 17) | leaveMessage(member) {
method replaceText (line 24) | replaceText(str, member) {
FILE: src/events/klasaReady.js
method run (line 5) | async run() {
FILE: src/events/messageDelete.js
method run (line 6) | async run(message) {
FILE: src/events/messageDeleteBulk.js
method run (line 6) | async run(messages) {
FILE: src/events/messageReactionAdd.js
method run (line 7) | async run(reaction) {
method checkAttachments (line 57) | checkAttachments(attachment) {
method provider (line 65) | get provider() {
FILE: src/events/messageReactionRemove.js
method run (line 6) | async run(reaction) {
method checkAttachments (line 44) | checkAttachments(attachment) {
method provider (line 52) | get provider() {
FILE: src/events/messageUpdate.js
method run (line 6) | async run(oldMessage, newMessage) {
FILE: src/events/reconnecting.js
method run (line 5) | async run() {
FILE: src/events/resumed.js
method run (line 5) | run() {
FILE: src/events/roleCreate.js
method run (line 6) | async run(role) {
FILE: src/events/roleDelete.js
method run (line 6) | async run(role) {
FILE: src/events/shardError.js
method run (line 5) | async run(error, shardID) {
FILE: src/extendables/fetchURL.js
method constructor (line 5) | constructor(...args) {
method fetchURL (line 9) | fetchURL(url, options = {}) {
FILE: src/extendables/prompt.js
method constructor (line 6) | constructor(...args) {
method prompt (line 10) | async prompt(text, time = 30000) {
FILE: src/finalizers/commandCounter.js
method run (line 5) | async run() {
FILE: src/functions/friendlyDuration.js
method run (line 5) | run(ms) {
FILE: src/functions/images.js
method run (line 5) | run(endpoint, load = {}) {
FILE: src/functions/isPatron.js
method run (line 5) | run(guild) {
FILE: src/functions/isUpvoter.js
method run (line 5) | run(user) {
FILE: src/functions/randomNumber.js
method run (line 5) | run(min, max) {
FILE: src/functions/scrapeSubreddit.js
method run (line 5) | async run(subreddit, options = { }) {
FILE: src/inhibitors/disabledGroup.js
method constructor (line 5) | constructor(...args) {
method run (line 9) | async run(msg, cmd) {
FILE: src/inhibitors/patronOnly.js
method constructor (line 5) | constructor(...args) {
method run (line 9) | async run(msg, cmd) {
FILE: src/inhibitors/requireDJ.js
method constructor (line 5) | constructor(...args) {
method run (line 9) | async run(msg, cmd) {
FILE: src/inhibitors/requireMusic.js
method constructor (line 5) | constructor(...args) {
method run (line 9) | async run(msg, cmd) {
FILE: src/inhibitors/upvoterOnly.js
method constructor (line 5) | constructor(...args) {
method run (line 9) | async run(msg, cmd) {
FILE: src/languages/en-US.js
method constructor (line 5) | constructor(...args) {
method init (line 474) | async init() {
FILE: src/languages/es-ES.js
method constructor (line 5) | constructor(...args) {
method init (line 462) | async init() {
FILE: src/languages/fr-FR.js
method constructor (line 5) | constructor(...args) {
method init (line 467) | async init() {
FILE: src/languages/it-IT.js
method constructor (line 5) | constructor(...args) {
method init (line 477) | async init() {
FILE: src/languages/sar-IT.js
method constructor (line 5) | constructor(...args) {
method init (line 463) | async init() {
FILE: src/lib/structures/KlasaCommand.js
class Command (line 3) | class Command extends KlasaCommand {
method constructor (line 5) | constructor(store, file, core, { upvoteOnly = false, patronOnly = fals...
FILE: src/lib/structures/ModLog.js
method constructor (line 6) | constructor(guild) {
method setType (line 23) | setType(type) {
method setUser (line 33) | setUser(user) {
method setModerator (line 46) | setModerator(user) {
method setReason (line 60) | setReason(reason = null) {
method send (line 70) | async send() {
method embed (line 91) | get embed() {
method getCase (line 108) | async getCase() {
method caseInfo (line 119) | get caseInfo() {
method provider (line 134) | get provider() {
method color (line 143) | static color(type) {
FILE: src/lib/structures/PenguClient.js
class PenguClient (line 23) | class PenguClient extends Client {
method constructor (line 25) | constructor(options) {
FILE: src/lib/structures/PenguGuild.js
class KlasaGuild (line 5) | class KlasaGuild extends Guild {
method constructor (line 7) | constructor(client, data) {
FILE: src/lib/structures/PenguMember.js
class KlasaMember (line 4) | class KlasaMember extends GuildMember {
method constructor (line 6) | constructor(...args) {
method toJSON (line 12) | toJSON() {
FILE: src/lib/structures/PenguMemberManager.js
method _fetchSingle (line 5) | async _fetchSingle(...args) {
method _fetchMany (line 11) | async _fetchMany(...args) {
FILE: src/lib/structures/ServerLog.js
method constructor (line 6) | constructor(guild) {
method setColor (line 22) | setColor(type) {
method setType (line 32) | setType(type) {
method setAuthor (line 43) | setAuthor(name = null, iconurl = null) {
method setMessage (line 53) | setMessage(message = null) {
method setName (line 64) | setName(name = null) {
method send (line 74) | async send() {
method embed (line 89) | get embed() {
method color (line 112) | color(type) {
FILE: src/lib/tags/getjson.js
function getProp (line 14) | function getProp(body, prop) {
FILE: src/lib/util/Util.js
class Util (line 3) | class Util {
method toCodePoint (line 5) | static toCodePoint(unicode) {
method haste (line 22) | static haste(data, extension = "js") {
method fetch (line 27) | static async fetch(url, options, type) {
method shuffleArray (line 54) | static shuffleArray(array) {
FILE: src/middlewares/headers.js
method constructor (line 5) | constructor(...args) {
method run (line 9) | run(req, res) {
FILE: src/middlewares/json.js
method constructor (line 6) | constructor(...args) {
method run (line 10) | async run(req) {
method contentStream (line 27) | contentStream(req) {
FILE: src/monitors/afk.js
method constructor (line 5) | constructor(...args) {
method run (line 9) | async run(msg) {
method checkAfk (line 16) | async checkAfk(msg) {
method afkMentioned (line 23) | async afkMentioned(msg) {
FILE: src/monitors/antiinvites.js
method constructor (line 6) | constructor(...args) {
method run (line 14) | async run(msg) {
FILE: src/monitors/memberProfiles.js
method constructor (line 9) | constructor(...args) {
method run (line 17) | async run(msg) {
method handleLevelup (line 40) | async handleLevelup(msg) {
method leveledroles (line 47) | async leveledroles(msg) {
method generateLevelUpImage (line 67) | async generateLevelUpImage(background, userAvatar) {
FILE: src/monitors/perspectivemod.js
method constructor (line 5) | constructor(...args) {
method run (line 9) | async run(msg) {
FILE: src/monitors/profiles.js
method constructor (line 9) | constructor(...args) {
method run (line 17) | async run(msg) {
method generateLevelUpImage (line 41) | async generateLevelUpImage(background, userAvatar) {
FILE: src/providers/rethinkdb.js
method constructor (line 7) | constructor(...args) {
method init (line 15) | async init() {
method exec (line 20) | get exec() {
method ping (line 24) | async ping() {
method shutdown (line 29) | async shutdown() {
method hasTable (line 35) | async hasTable(table) {
method createTable (line 39) | async createTable(table) {
method deleteTable (line 43) | async deleteTable(table) {
method sync (line 47) | async sync(table) {
method getAll (line 53) | async getAll(table, entries = []) {
method getKeys (line 63) | async getKeys(table, entries = []) {
method get (line 73) | async get(table, id) {
method has (line 77) | async has(table, id) {
method getRandom (line 81) | async getRandom(table) {
method create (line 85) | async create(table, id, value = {}) {
method update (line 89) | async update(table, id, value = {}) {
method replace (line 93) | async replace(table, id, value = {}) {
method delete (line 97) | async delete(table, id) {
FILE: src/routes/application.js
method constructor (line 5) | constructor(...args) {
method get (line 9) | async get(request, response) {
FILE: src/routes/dblHook.js
method constructor (line 5) | constructor(...args) {
method post (line 11) | async post(req, res) {
FILE: src/routes/kdhGuild.js
method constructor (line 5) | constructor(...args) {
method get (line 9) | async get(request, response) {
FILE: src/routes/pieces.js
method constructor (line 5) | constructor(...args) {
method get (line 9) | get(request, response) {
FILE: src/routes/syncdb.js
method constructor (line 6) | constructor(...args) {
method get (line 10) | async get(request, response) {
FILE: src/tasks/datadog.js
method run (line 5) | async run() {
method init (line 24) | init() {
FILE: src/tasks/memorySweeper.js
constant THRESHOLD (line 7) | const THRESHOLD = 1000 * 60 * 10;
method constructor (line 11) | constructor(...args) {
method run (line 25) | async run() {
method setColor (line 77) | setColor(number) {
FILE: src/tasks/reminder.js
method run (line 5) | async run({ channel, user, text }) {
FILE: src/tasks/stats.js
method run (line 5) | async run() {
FILE: src/tasks/tempMute.js
method run (line 6) | async run({ guildID, userID }) {
FILE: src/tasks/timedBan.js
method run (line 6) | async run({ guildID, userID }) {
Condensed preview — 240 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (731K chars).
[
{
"path": ".eslintrc.js",
"chars": 7348,
"preview": "module.exports = {\n extends: \"eslint:recommended\",\n env: {\n node: true,\n es6: true\n },\n parser"
},
{
"path": ".github/CONTRIBUTING.md",
"chars": 2979,
"preview": "## Contribute\nWe love contributors because they make this project even better with their unique talent and skills. If yo"
},
{
"path": ".github/FUNDING.yml",
"chars": 403,
"preview": "# These are supported funding model platforms\n\ngithub: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [u"
},
{
"path": ".github/ISSUE_TEMPLATE/Bug_report.md",
"chars": 619,
"preview": "---\r\nname: Bug report\r\nabout: Create a report to help us improve\r\n\r\n---\r\n\r\n**Describe the bug**\r\nA clear and concise des"
},
{
"path": ".github/ISSUE_TEMPLATE/Feature_request.md",
"chars": 577,
"preview": "---\r\nname: Feature request\r\nabout: Suggest an idea for this project\r\n\r\n---\r\n\r\n**Is your feature request related to a pro"
},
{
"path": ".github/PULL_REQUEST_TEMPLATE.md",
"chars": 420,
"preview": "### Description of Your Pull Request\nWhat does your pull request specifically does by adding/modifying or removing code?"
},
{
"path": ".github/workflows/test.yml",
"chars": 903,
"preview": "name: CI\n\non:\n push:\n branches:\n - master\n pull_request:\n\njobs:\n test:\n name: Node v${{ matrix.node_versio"
},
{
"path": ".gitignore",
"chars": 1031,
"preview": "# Logs\nlogs\n*.log\nnpm-debug.log*\nyarn-debug.log*\nyarn-error.log*\n\n# Runtime data\npids\n*.pid\n*.seed\n*.pid.lock\n\n# Directo"
},
{
"path": "Dockerfile",
"chars": 738,
"preview": "FROM node:14.9.0-alpine\n\nRUN mkdir -p /home/pengubot/\nWORKDIR /home/pengubot/\n\nRUN apk add --no-cache \\\n\tbuild-base \\\n\tc"
},
{
"path": "LICENSE",
"chars": 1080,
"preview": "MIT License\n\nCopyright (c) 2018-2020 Aditya N. Tripathi\n\nPermission is hereby granted, free of charge, to any person obt"
},
{
"path": "README.md",
"chars": 2843,
"preview": "<div align=\"center\">\n<p align=\"center\"><a href=\"https://www.pengubot.com\"><img src=\"https://i.imgur.com/smPeYN6.png)\"></"
},
{
"path": "docker-compose.yml",
"chars": 188,
"preview": "version: '3.8'\nservices:\n pengubot:\n container_name: pengubot\n image: pengubot\n build:\n context: .\n "
},
{
"path": "package.json",
"chars": 1478,
"preview": "{\n \"name\": \"pengubot\",\n \"version\": \"2.0.8\",\n \"description\": \"PenguBot Rewrite for Performance and Stability.\",\n \"mai"
},
{
"path": "src/PenguBot.js",
"chars": 640,
"preview": "const { BaseCluster } = require(\"kurasuta\");\nconst Raven = require(\"raven\");\nconst config = require(\"../config.js\");\ncon"
},
{
"path": "src/arguments/channelname.js",
"chars": 598,
"preview": "const { Argument } = require(\"../index\");\n\nconst regex = Argument.regex.channel;\n\nmodule.exports = class extends Argumen"
},
{
"path": "src/arguments/membername.js",
"chars": 2046,
"preview": "const { Argument, klasaUtil: { regExpEsc }, GuildMember, User } = require(\"../index\");\n\nconst USER_REGEXP = Argument.reg"
},
{
"path": "src/arguments/rolename.js",
"chars": 1527,
"preview": "// Copyright (c) 2017-2019 dirigeants. All rights reserved. MIT license.\nconst { Argument, klasaUtil: { regExpEsc }, Rol"
},
{
"path": "src/arguments/username.js",
"chars": 1786,
"preview": "const { Argument, klasaUtil: { regExpEsc }, GuildMember, User } = require(\"../index\");\n\nconst USER_REGEXP = Argument.reg"
},
{
"path": "src/commands/Developer/eval.js",
"chars": 5224,
"preview": "const { Command, Stopwatch, Type, klasaUtil: util, util: { haste } } = require(\"../../index\");\nconst { inspect } = requi"
},
{
"path": "src/commands/Developer/exec.js",
"chars": 868,
"preview": "const { Command, util: { exec, codeBlock } } = require(\"klasa\");\n\nmodule.exports = class extends Command {\n\n construc"
},
{
"path": "src/commands/Developer/setgame.js",
"chars": 1049,
"preview": "const Command = require(\"../../lib/structures/KlasaCommand\");\n\nmodule.exports = class extends Command {\n\n constructor"
},
{
"path": "src/commands/Developer/togglepatronguild.js",
"chars": 654,
"preview": "const Command = require(\"../../lib/structures/KlasaCommand\");\n\nmodule.exports = class extends Command {\n\n constructor"
},
{
"path": "src/commands/Game Statistics/clashofclans.js",
"chars": 2474,
"preview": "const { Command, MessageEmbed, config } = require(\"../../index\");\n\nmodule.exports = class extends Command {\n\n constru"
},
{
"path": "src/commands/Game Statistics/csgo.js",
"chars": 2895,
"preview": "const { Command, MessageEmbed, config } = require(\"../../index\");\n\nmodule.exports = class extends Command {\n\n constru"
},
{
"path": "src/commands/Game Statistics/fortnite.js",
"chars": 2497,
"preview": "const { Command, MessageEmbed, config } = require(\"../../index\");\n\nmodule.exports = class extends Command {\n\n constru"
},
{
"path": "src/commands/Game Statistics/osu.js",
"chars": 2240,
"preview": "const { Command, config, MessageEmbed, Duration } = require(\"../../index\");\n\nmodule.exports = class extends Command {\n\n "
},
{
"path": "src/commands/Games/8ball.js",
"chars": 1008,
"preview": "const Command = require(\"../../lib/structures/KlasaCommand\");\nconst answers = [\n \"Maybe.\", \"Certainly not.\", \"I hope "
},
{
"path": "src/commands/Games/rps.js",
"chars": 1779,
"preview": "const Command = require(\"../../lib/structures/KlasaCommand\");\nconst choices = [\"rock\", \"paper\", \"scissors\"];\n\nmodule.exp"
},
{
"path": "src/commands/Games/slots.js",
"chars": 3032,
"preview": "const Command = require(\"../../lib/structures/KlasaCommand\");\nconst slots = [\"🍔\", \"🍟\", \"🌭\", \"🍕\", \"🌮\", \"🍘\", \"🍫\", \"🍿\", \"🍩\""
},
{
"path": "src/commands/General/Chat Bot Info/donate.js",
"chars": 832,
"preview": "const Command = require(\"../../../lib/structures/KlasaCommand\");\nconst { MessageEmbed } = require(\"discord.js\");\n\nmodule"
},
{
"path": "src/commands/General/Chat Bot Info/help.js",
"chars": 2183,
"preview": "const { Command, klasaUtil: { isFunction }, MessageEmbed } = require(\"../../../index\");\n\nmodule.exports = class extends "
},
{
"path": "src/commands/General/Chat Bot Info/info.js",
"chars": 742,
"preview": "const Command = require(\"../../../lib/structures/KlasaCommand\");\nconst { MessageEmbed } = require(\"discord.js\");\n\nmodule"
},
{
"path": "src/commands/General/Chat Bot Info/nodeinfo.js",
"chars": 1083,
"preview": "const Command = require(\"../../../lib/structures/KlasaCommand\");\nconst { MessageEmbed } = require(\"discord.js\");\nmodule."
},
{
"path": "src/commands/General/Chat Bot Info/settings.js",
"chars": 22583,
"preview": "const { Command, RichDisplay, MessageEmbed } = require(\"../../../index\");\n\nmodule.exports = class extends Command {\n\n "
},
{
"path": "src/commands/General/Chat Bot Info/stats.js",
"chars": 2591,
"preview": "const { Command, Duration } = require(\"klasa\");\nconst { MessageEmbed } = require(\"discord.js\");\nmodule.exports = class e"
},
{
"path": "src/commands/General/Chat Bot Info/support.js",
"chars": 430,
"preview": "const Command = require(\"../../../lib/structures/KlasaCommand\");\n\nmodule.exports = class extends Command {\n\n construc"
},
{
"path": "src/commands/General/Chat Bot Info/upvote.js",
"chars": 784,
"preview": "const Command = require(\"../../../lib/structures/KlasaCommand\");\nconst { MessageEmbed } = require(\"discord.js\");\n\nmodule"
},
{
"path": "src/commands/Images/cat.js",
"chars": 946,
"preview": "const { Command, MessageEmbed } = require(\"../../index\");\n\nmodule.exports = class extends Command {\n\n constructor(..."
},
{
"path": "src/commands/Images/cookie.js",
"chars": 1454,
"preview": "const { Command, MessageEmbed } = require(\"../../index\");\n\nconst cookies = [\"http://i.imgur.com/SLwEY66.gif\", \"http://i."
},
{
"path": "src/commands/Images/cuddle.js",
"chars": 946,
"preview": "const { Command, MessageEmbed } = require(\"../../index\");\n\nmodule.exports = class extends Command {\n\n constructor(..."
},
{
"path": "src/commands/Images/dog.js",
"chars": 910,
"preview": "const { Command, MessageEmbed } = require(\"../../index\");\n\nmodule.exports = class extends Command {\n\n constructor(..."
},
{
"path": "src/commands/Images/feed.js",
"chars": 937,
"preview": "const { Command, MessageEmbed } = require(\"../../index\");\n\nmodule.exports = class extends Command {\n\n constructor(..."
},
{
"path": "src/commands/Images/fox.js",
"chars": 858,
"preview": "const { Command, MessageEmbed } = require(\"../../index\");\n\nmodule.exports = class extends Command {\n\n constructor(..."
},
{
"path": "src/commands/Images/hug.js",
"chars": 934,
"preview": "const { Command, MessageEmbed } = require(\"../../index\");\n\nmodule.exports = class extends Command {\n\n constructor(..."
},
{
"path": "src/commands/Images/kiss.js",
"chars": 939,
"preview": "const { Command, MessageEmbed } = require(\"../../index\");\n\nmodule.exports = class extends Command {\n\n constructor(..."
},
{
"path": "src/commands/Images/meme.js",
"chars": 1145,
"preview": "const { Command } = require(\"../../index\");\nconst subReddits = [\"AdviceAnimals\", \"MemeEconomy\", \"ComedyCemetery\", \"memes"
},
{
"path": "src/commands/Images/pat.js",
"chars": 935,
"preview": "const { Command, MessageEmbed } = require(\"../../index\");\n\nmodule.exports = class extends Command {\n\n constructor(..."
},
{
"path": "src/commands/Images/pengu.js",
"chars": 1709,
"preview": "const Command = require(\"../../lib/structures/KlasaCommand\");\nconst { MessageEmbed } = require(\"discord.js\");\n\nconst pic"
},
{
"path": "src/commands/Images/poke.js",
"chars": 939,
"preview": "const { Command, MessageEmbed } = require(\"../../index\");\n\nmodule.exports = class extends Command {\n\n constructor(..."
},
{
"path": "src/commands/Images/punch.js",
"chars": 1535,
"preview": "const Command = require(\"../../lib/structures/KlasaCommand\");\nconst { MessageEmbed } = require(\"discord.js\");\n\nconst pun"
},
{
"path": "src/commands/Images/randomcomic.js",
"chars": 1103,
"preview": "const { Command, MessageEmbed } = require(\"../../index\");\nconst { parse } = require(\"node-html-parser\");\n\nmodule.exports"
},
{
"path": "src/commands/Images/slap.js",
"chars": 938,
"preview": "const { Command, MessageEmbed } = require(\"../../index\");\n\nmodule.exports = class extends Command {\n\n constructor(..."
},
{
"path": "src/commands/Images/tickle.js",
"chars": 946,
"preview": "const { Command, MessageEmbed } = require(\"../../index\");\n\nmodule.exports = class extends Command {\n\n constructor(..."
},
{
"path": "src/commands/Images/wholesome.js",
"chars": 754,
"preview": "const { Command } = require(\"../../index\");\n\nconst SUB_REDDITS = [\"wholesome\", \"aww\", \"AnimalsBeingBros\"];\nmodule.export"
},
{
"path": "src/commands/Jokes and Stuff/chucknorris.js",
"chars": 751,
"preview": "const { Command, MessageEmbed } = require(\"../../index\");\n\nmodule.exports = class extends Command {\n\n constructor(..."
},
{
"path": "src/commands/Jokes and Stuff/compliment.js",
"chars": 2205,
"preview": "const Command = require(\"../../lib/structures/KlasaCommand\");\nconst Compliments = [\n \"You're my kind of weird.\", \"I l"
},
{
"path": "src/commands/Jokes and Stuff/dadjoke.js",
"chars": 845,
"preview": "const { Command, MessageEmbed } = require(\"../../index\");\n\nmodule.exports = class extends Command {\n\n constructor(..."
},
{
"path": "src/commands/Jokes and Stuff/dice.js",
"chars": 620,
"preview": "const Command = require(\"../../lib/structures/KlasaCommand\");\n\nmodule.exports = class extends Command {\n\n constructor"
},
{
"path": "src/commands/Jokes and Stuff/fml.js",
"chars": 1036,
"preview": "const { Command, MessageEmbed } = require(\"../../index\");\nconst { parse } = require(\"node-html-parser\");\n\nmodule.exports"
},
{
"path": "src/commands/Jokes and Stuff/insult.js",
"chars": 4499,
"preview": "const Command = require(\"../../lib/structures/KlasaCommand\");\nconst start = [\"a lazy\", \"a stupid\", \"an insecure\", \"an id"
},
{
"path": "src/commands/Jokes and Stuff/randomfact.js",
"chars": 770,
"preview": "const { Command, MessageEmbed } = require(\"../../index\");\nconst facts = require(\"../../lib/constants/facts.json\");\n\nmodu"
},
{
"path": "src/commands/Jokes and Stuff/trump.js",
"chars": 957,
"preview": "const { Command, MessageEmbed } = require(\"../../index\");\n\nmodule.exports = class extends Command {\n\n constructor(..."
},
{
"path": "src/commands/Jokes and Stuff/yomomma.js",
"chars": 817,
"preview": "const { Command, MessageEmbed } = require(\"../../index\");\nconst data = require(\"../../lib/constants/yomomma\");\n\nmodule.e"
},
{
"path": "src/commands/Management/Automod/manageautomod.js",
"chars": 3124,
"preview": "const { Command } = require(\"../../../index\");\n\nmodule.exports = class extends Command {\n\n constructor(...args) {\n "
},
{
"path": "src/commands/Management/Automod/toggleinvites.js",
"chars": 880,
"preview": "const Command = require(\"../../../lib/structures/KlasaCommand\");\n\nmodule.exports = class extends Command {\n\n construc"
},
{
"path": "src/commands/Management/Autoroles/addautoroles.js",
"chars": 1219,
"preview": "const { Command } = require(\"../../../index\");\n\nmodule.exports = class extends Command {\n\n constructor(...args) {\n "
},
{
"path": "src/commands/Management/Autoroles/toggleautoroles.js",
"chars": 907,
"preview": "const { Command } = require(\"../../../index\");\n\nmodule.exports = class extends Command {\n\n constructor(...args) {\n "
},
{
"path": "src/commands/Management/Custom Commands/createcmd.js",
"chars": 1312,
"preview": "const { Command } = require(\"../../../index\");\n\nmodule.exports = class extends Command {\n\n constructor(...args) {\n "
},
{
"path": "src/commands/Management/Custom Commands/deletecmd.js",
"chars": 1053,
"preview": "const { Command } = require(\"../../../index\");\n\nmodule.exports = class extends Command {\n\n constructor(...args) {\n "
},
{
"path": "src/commands/Management/Custom Commands/listcmds.js",
"chars": 1609,
"preview": "const { Command, RichDisplay, MessageEmbed } = require(\"../../../index\");\n\nmodule.exports = class extends Command {\n\n "
},
{
"path": "src/commands/Management/Custom Commands/togglecustomcmds.js",
"chars": 923,
"preview": "const { Command } = require(\"../../../index\");\n\nmodule.exports = class extends Command {\n\n constructor(...args) {\n "
},
{
"path": "src/commands/Management/Custom Commands/updatecmd.js",
"chars": 1641,
"preview": "const { Command } = require(\"../../../index\");\n\nmodule.exports = class extends Command {\n\n constructor(...args) {\n "
},
{
"path": "src/commands/Management/Level Roles/listlevelroles.js",
"chars": 1443,
"preview": "const { Command, RichDisplay, MessageEmbed } = require(\"../../../index\");\n\nmodule.exports = class extends Command {\n\n "
},
{
"path": "src/commands/Management/Level Roles/managelevelroles.js",
"chars": 2064,
"preview": "const { Command } = require(\"../../../index\");\n\nmodule.exports = class extends Command {\n\n constructor(...args) {\n "
},
{
"path": "src/commands/Management/Level Roles/togglelevelroles.js",
"chars": 914,
"preview": "const { Command } = require(\"../../../index\");\n\nmodule.exports = class extends Command {\n\n constructor(...args) {\n "
},
{
"path": "src/commands/Management/Logging/log.js",
"chars": 2442,
"preview": "const { Command } = require(\"../../../index\");\n\nmodule.exports = class extends Command {\n\n constructor(...args) {\n "
},
{
"path": "src/commands/Management/Logging/loggingchannel.js",
"chars": 808,
"preview": "const { Command } = require(\"../../../index\");\n\nmodule.exports = class extends Command {\n\n constructor(...args) {\n "
},
{
"path": "src/commands/Management/Logging/modlogs.js",
"chars": 1418,
"preview": "const Command = require(\"../../../lib/structures/KlasaCommand\");\n\nmodule.exports = class extends Command {\n\n construc"
},
{
"path": "src/commands/Management/Self Roles/manageselfroles.js",
"chars": 1332,
"preview": "const { Command } = require(\"../../../index\");\n\nmodule.exports = class extends Command {\n\n constructor(...args) {\n "
},
{
"path": "src/commands/Management/Self Roles/selfroles.js",
"chars": 4371,
"preview": "const { Command, RichDisplay, MessageEmbed } = require(\"../../../index\");\n\nmodule.exports = class extends Command {\n\n "
},
{
"path": "src/commands/Management/Self Roles/toggleselfroles.js",
"chars": 897,
"preview": "const { Command } = require(\"../../../index\");\n\nmodule.exports = class extends Command {\n\n constructor(...args) {\n "
},
{
"path": "src/commands/Management/Starboard/starboard.js",
"chars": 3516,
"preview": "const { Command, MessageEmbed } = require(\"../../../index\");\n\nmodule.exports = class extends Command {\n\n constructor("
},
{
"path": "src/commands/Management/Starboard/starboardchannel.js",
"chars": 842,
"preview": "const { Command } = require(\"../../../index\");\n\nmodule.exports = class extends Command {\n\n constructor(...args) {\n "
},
{
"path": "src/commands/Management/Starboard/starsrequired.js",
"chars": 926,
"preview": "const { Command } = require(\"../../../index\");\n\nmodule.exports = class extends Command {\n\n constructor(...args) {\n "
},
{
"path": "src/commands/Management/Starboard/togglestarboard.js",
"chars": 868,
"preview": "const { Command } = require(\"../../../index\");\n\nmodule.exports = class extends Command {\n\n constructor(...args) {\n "
},
{
"path": "src/commands/Management/Welcome & Leave/setleavechannel.js",
"chars": 1303,
"preview": "const { Command } = require(\"../../../index\");\n\nmodule.exports = class extends Command {\n\n constructor(...args) {\n "
},
{
"path": "src/commands/Management/Welcome & Leave/setleavemsg.js",
"chars": 775,
"preview": "const { Command } = require(\"../../../index\");\n\nmodule.exports = class extends Command {\n\n constructor(...args) {\n "
},
{
"path": "src/commands/Management/Welcome & Leave/setwelcomechannel.js",
"chars": 1308,
"preview": "const { Command } = require(\"../../../index\");\n\nmodule.exports = class extends Command {\n\n constructor(...args) {\n "
},
{
"path": "src/commands/Management/Welcome & Leave/setwelcomemsg.js",
"chars": 781,
"preview": "const { Command } = require(\"../../../index\");\n\nmodule.exports = class extends Command {\n\n constructor(...args) {\n "
},
{
"path": "src/commands/Management/Welcome & Leave/toggleleave.js",
"chars": 1386,
"preview": "const { Command } = require(\"../../../index\");\n\nmodule.exports = class extends Command {\n\n constructor(...args) {\n "
},
{
"path": "src/commands/Management/Welcome & Leave/togglewelcome.js",
"chars": 1397,
"preview": "const { Command } = require(\"../../../index\");\n\nmodule.exports = class extends Command {\n\n constructor(...args) {\n "
},
{
"path": "src/commands/Manipulation/achievement.js",
"chars": 883,
"preview": "const { Command } = require(\"../../index\");\n\nmodule.exports = class extends Command {\n\n constructor(...args) {\n "
},
{
"path": "src/commands/Manipulation/approved.js",
"chars": 805,
"preview": "const { Command } = require(\"../../index\");\n\nmodule.exports = class extends Command {\n\n constructor(...args) {\n "
},
{
"path": "src/commands/Manipulation/batslap.js",
"chars": 875,
"preview": "const { Command } = require(\"../../index\");\n\nmodule.exports = class extends Command {\n\n constructor(...args) {\n "
},
{
"path": "src/commands/Manipulation/beautiful.js",
"chars": 825,
"preview": "const { Command } = require(\"../../index\");\n\nmodule.exports = class extends Command {\n\n constructor(...args) {\n "
},
{
"path": "src/commands/Manipulation/changemymind.js",
"chars": 817,
"preview": "const { Command } = require(\"../../index\");\n\nmodule.exports = class extends Command {\n\n constructor(...args) {\n "
},
{
"path": "src/commands/Manipulation/facepalm.js",
"chars": 788,
"preview": "const { Command } = require(\"../../index\");\n\nmodule.exports = class extends Command {\n\n constructor(...args) {\n "
},
{
"path": "src/commands/Manipulation/garbage.js",
"chars": 841,
"preview": "const { Command } = require(\"../../index\");\n\nmodule.exports = class extends Command {\n\n constructor(...args) {\n "
},
{
"path": "src/commands/Manipulation/illegal.js",
"chars": 846,
"preview": "const { Command } = require(\"../../index\");\n\nmodule.exports = class extends Command {\n\n constructor(...args) {\n "
},
{
"path": "src/commands/Manipulation/lio.js",
"chars": 811,
"preview": "const { Command } = require(\"../../index\");\n\nmodule.exports = class extends Command {\n\n constructor(...args) {\n "
},
{
"path": "src/commands/Manipulation/missing.js",
"chars": 847,
"preview": "const { Command } = require(\"../../index\");\n\nmodule.exports = class extends Command {\n\n constructor(...args) {\n "
},
{
"path": "src/commands/Manipulation/rejected.js",
"chars": 800,
"preview": "const { Command } = require(\"../../index\");\n\nmodule.exports = class extends Command {\n\n constructor(...args) {\n "
},
{
"path": "src/commands/Manipulation/respect.js",
"chars": 812,
"preview": "const { Command } = require(\"../../index\");\n\nmodule.exports = class extends Command {\n\n constructor(...args) {\n "
},
{
"path": "src/commands/Manipulation/snap.js",
"chars": 767,
"preview": "const { Command } = require(\"../../index\");\n\nmodule.exports = class extends Command {\n\n constructor(...args) {\n "
},
{
"path": "src/commands/Manipulation/superpunch.js",
"chars": 884,
"preview": "const { Command } = require(\"../../index\");\n\nmodule.exports = class extends Command {\n\n constructor(...args) {\n "
},
{
"path": "src/commands/Manipulation/tattoo.js",
"chars": 817,
"preview": "const { Command } = require(\"../../index\");\n\nmodule.exports = class extends Command {\n\n constructor(...args) {\n "
},
{
"path": "src/commands/Manipulation/tinder.js",
"chars": 948,
"preview": "const { Command } = require(\"../../index\");\n\nmodule.exports = class extends Command {\n\n constructor(...args) {\n "
},
{
"path": "src/commands/Manipulation/triggered.js",
"chars": 841,
"preview": "const { Command } = require(\"../../index\");\n\nmodule.exports = class extends Command {\n\n constructor(...args) {\n "
},
{
"path": "src/commands/Manipulation/vault.js",
"chars": 782,
"preview": "const { Command } = require(\"../../index\");\n\nmodule.exports = class extends Command {\n\n constructor(...args) {\n "
},
{
"path": "src/commands/Manipulation/wanted.js",
"chars": 823,
"preview": "const { Command } = require(\"../../index\");\n\nmodule.exports = class extends Command {\n\n constructor(...args) {\n "
},
{
"path": "src/commands/Moderation/ban.js",
"chars": 3036,
"preview": "/* eslint-disable no-unused-expressions */\nconst { Command, ModLog, Duration } = require(\"../../index\");\n\nmodule.exports"
},
{
"path": "src/commands/Moderation/case.js",
"chars": 1421,
"preview": "const { Command, MessageEmbed } = require(\"../../index\");\n\nmodule.exports = class extends Command {\n\n constructor(..."
},
{
"path": "src/commands/Moderation/history.js",
"chars": 1564,
"preview": "const { Command, MessageEmbed } = require(\"../../index\");\n\nmodule.exports = class extends Command {\n\n constructor(..."
},
{
"path": "src/commands/Moderation/kick.js",
"chars": 1929,
"preview": "const { Command, ModLog } = require(\"../../index\");\n\nmodule.exports = class extends Command {\n\n constructor(...args) "
},
{
"path": "src/commands/Moderation/mute.js",
"chars": 5747,
"preview": "/* eslint-disable no-unused-expressions */\nconst { Command, ModLog, Duration, Permissions: { FLAGS } } = require(\"../../"
},
{
"path": "src/commands/Moderation/prune.js",
"chars": 2158,
"preview": "const Command = require(\"../../lib/structures/KlasaCommand\");\n\nmodule.exports = class extends Command {\n\n constructor"
},
{
"path": "src/commands/Moderation/reason.js",
"chars": 3062,
"preview": "const { Command, ModLog, klasaUtil, MessageEmbed } = require(\"../../index\");\n\nmodule.exports = class extends Command {\n\n"
},
{
"path": "src/commands/Moderation/softban.js",
"chars": 2649,
"preview": "const { Command, ModLog } = require(\"../../index\");\n\nmodule.exports = class extends Command {\n\n constructor(...args) "
},
{
"path": "src/commands/Moderation/warn.js",
"chars": 1362,
"preview": "const { Command, ModLog } = require(\"../../index\");\n\nmodule.exports = class extends Command {\n\n constructor(...args) "
},
{
"path": "src/commands/Music/music.js",
"chars": 3161,
"preview": "const KlasaCommand = require(\"../../lib/structures/KlasaCommand\");\nconst { MessageEmbed } = require(\"discord.js\");\n\nmodu"
},
{
"path": "src/commands/Profiles/backgrounds.js",
"chars": 7458,
"preview": "const { Command, RichDisplay } = require(\"klasa\");\nconst { MessageEmbed } = require(\"discord.js\");\nconst list = [{ c: 1,"
},
{
"path": "src/commands/Profiles/daily.js",
"chars": 2262,
"preview": "const Command = require(\"../../lib/structures/KlasaCommand\");\n\nmodule.exports = class extends Command {\n\n constructor"
},
{
"path": "src/commands/Profiles/leaderboard.js",
"chars": 2615,
"preview": "const Command = require(\"../../lib/structures/KlasaCommand\");\n\nmodule.exports = class extends Command {\n\n constructor"
},
{
"path": "src/commands/Profiles/levelup.js",
"chars": 2227,
"preview": "const Command = require(\"../../lib/structures/KlasaCommand\");\n\nmodule.exports = class extends Command {\n\n constructor"
},
{
"path": "src/commands/Profiles/managexp.js",
"chars": 1453,
"preview": "const Command = require(\"../../lib/structures/KlasaCommand\");\n\nmodule.exports = class extends Command {\n\n constructor"
},
{
"path": "src/commands/Profiles/profile.js",
"chars": 3688,
"preview": "const Command = require(\"../../lib/structures/KlasaCommand\");\nconst { Canvas } = require(\"canvas-constructor\");\nconst fs"
},
{
"path": "src/commands/Profiles/rank.js",
"chars": 4311,
"preview": "const Command = require(\"../../lib/structures/KlasaCommand\");\nconst { Canvas } = require(\"canvas-constructor\");\nconst fs"
},
{
"path": "src/commands/Profiles/rep.js",
"chars": 2688,
"preview": "const Command = require(\"../../lib/structures/KlasaCommand\");\n\nmodule.exports = class extends Command {\n\n constructor"
},
{
"path": "src/commands/Profiles/snowflakes.js",
"chars": 2190,
"preview": "const Command = require(\"../../lib/structures/KlasaCommand\");\n\nmodule.exports = class extends Command {\n\n constructor"
},
{
"path": "src/commands/Profiles/title.js",
"chars": 941,
"preview": "const Command = require(\"../../lib/structures/KlasaCommand\");\n\nmodule.exports = class extends Command {\n\n constructor"
},
{
"path": "src/commands/Settings/disablecmd.js",
"chars": 2081,
"preview": "const Command = require(\"../../lib/structures/KlasaCommand\");\n\nmodule.exports = class extends Command {\n\n constructor"
},
{
"path": "src/commands/Settings/manageadmin.js",
"chars": 4539,
"preview": "const Command = require(\"../../lib/structures/KlasaCommand\");\nconst { Role, MessageEmbed } = require(\"discord.js\");\n\nmod"
},
{
"path": "src/commands/Settings/managedj.js",
"chars": 4415,
"preview": "const Command = require(\"../../lib/structures/KlasaCommand\");\nconst { Role, MessageEmbed } = require(\"discord.js\");\n\nmod"
},
{
"path": "src/commands/Settings/managemod.js",
"chars": 4455,
"preview": "const Command = require(\"../../lib/structures/KlasaCommand\");\nconst { Role, MessageEmbed } = require(\"discord.js\");\n\nmod"
},
{
"path": "src/commands/Settings/managestaff.js",
"chars": 4251,
"preview": "const Command = require(\"../../lib/structures/KlasaCommand\");\nconst { Role, MessageEmbed } = require(\"discord.js\");\n\nmod"
},
{
"path": "src/commands/Settings/prefix.js",
"chars": 1131,
"preview": "const Command = require(\"../../lib/structures/KlasaCommand\");\n\nmodule.exports = class extends Command {\n\n constructor"
},
{
"path": "src/commands/Settings/setlanguage.js",
"chars": 2342,
"preview": "const Command = require(\"../../lib/structures/KlasaCommand\");\n\nmodule.exports = class extends Command {\n\n constructor"
},
{
"path": "src/commands/Settings/togglecategory.js",
"chars": 1461,
"preview": "const Command = require(\"../../lib/structures/KlasaCommand\");\n\nmodule.exports = class extends Command {\n\n constructor"
},
{
"path": "src/commands/Utilities/afk.js",
"chars": 893,
"preview": "const Command = require(\"../../lib/structures/KlasaCommand\");\n\nmodule.exports = class extends Command {\n\n constructor"
},
{
"path": "src/commands/Utilities/avatar.js",
"chars": 795,
"preview": "const Command = require(\"../../lib/structures/KlasaCommand\");\n\nmodule.exports = class extends Command {\n\n constructor"
},
{
"path": "src/commands/Utilities/choose.js",
"chars": 859,
"preview": "const Command = require(\"../../lib/structures/KlasaCommand\");\n\nmodule.exports = class extends Command {\n\n constructor"
},
{
"path": "src/commands/Utilities/covid.js",
"chars": 4340,
"preview": "const { Command, MessageEmbed } = require(\"../../index\");\nconst imageRegex = /<meta property=\"og:image\" content=\"([^<]*)"
},
{
"path": "src/commands/Utilities/emote.js",
"chars": 1314,
"preview": "const { Command, discordUtil: { parseEmoji }, util: { toCodePoint } } = require(\"../../index\");\n\nmodule.exports = class "
},
{
"path": "src/commands/Utilities/guild.js",
"chars": 1794,
"preview": "const Command = require(\"../../lib/structures/KlasaCommand\");\nconst { MessageEmbed } = require(\"discord.js\");\n\nconst fil"
},
{
"path": "src/commands/Utilities/lmgtfy.js",
"chars": 767,
"preview": "const Command = require(\"../../lib/structures/KlasaCommand\");\n\nmodule.exports = class extends Command {\n\n constructor"
},
{
"path": "src/commands/Utilities/poll.js",
"chars": 1381,
"preview": "const { Command } = require(\"../../index\");\n\nmodule.exports = class extends Command {\n\n constructor(...args) {\n "
},
{
"path": "src/commands/Utilities/quote.js",
"chars": 1645,
"preview": "const Command = require(\"../../lib/structures/KlasaCommand\");\nconst { Argument } = require(\"klasa\");\nconst { MessageEmbe"
},
{
"path": "src/commands/Utilities/reddit.js",
"chars": 2357,
"preview": "const { Command } = require(\"../../index\");\nconst subReddits = require(\"../../lib/constants/nsfw/subreddits.json\");\n\ncon"
},
{
"path": "src/commands/Utilities/remind.js",
"chars": 1046,
"preview": "const Command = require(\"../../lib/structures/KlasaCommand\");\n\nmodule.exports = class extends Command {\n\n constructor"
},
{
"path": "src/commands/Utilities/roleinfo.js",
"chars": 1182,
"preview": "const { Command, MessageEmbed } = require(\"../../index\");\n\nmodule.exports = class extends Command {\n\n constructor(..."
},
{
"path": "src/commands/Utilities/say.js",
"chars": 758,
"preview": "const Command = require(\"../../lib/structures/KlasaCommand\");\n\nmodule.exports = class extends Command {\n\n constructor"
},
{
"path": "src/commands/Utilities/shorten.js",
"chars": 834,
"preview": "const { Command } = require(\"../../index\");\n\nmodule.exports = class extends Command {\n\n constructor(...args) {\n "
},
{
"path": "src/commands/Utilities/translate.js",
"chars": 666,
"preview": "const { Command } = require(\"../../index\");\nconst translate = require(\"@k3rn31p4nic/google-translate-api\");\n\nmodule.expo"
},
{
"path": "src/commands/Utilities/twstats.js",
"chars": 1391,
"preview": "const { Command, MessageEmbed, Timestamp, config: { apis } } = require(\"../../index\");\n\nconst timestamp = new Timestamp("
},
{
"path": "src/commands/Utilities/urban.js",
"chars": 1446,
"preview": "const { Command, MessageEmbed } = require(\"../../index\");\n\nmodule.exports = class extends Command {\n\n constructor(..."
},
{
"path": "src/commands/Utilities/userinfo.js",
"chars": 1681,
"preview": "const { Command, Timestamp, MessageEmbed } = require(\"../../index\");\n\nmodule.exports = class extends Command {\n\n cons"
},
{
"path": "src/commands/Utilities/weather.js",
"chars": 5847,
"preview": "const { Command, config: { apis } } = require(\"../../index\");\nconst { Canvas } = require(\"canvas-constructor\");\nconst fs"
},
{
"path": "src/commands/Utilities/ytstats.js",
"chars": 2554,
"preview": "const { Command, Timestamp, MessageEmbed, config } = require(\"../../index\");\n\nmodule.exports = class extends Command {\n\n"
},
{
"path": "src/events/channelCreate.js",
"chars": 720,
"preview": "const { Event } = require(\"klasa\");\nconst ServerLog = require(\"../lib/structures/ServerLog\");\n\nmodule.exports = class ex"
},
{
"path": "src/events/channelDelete.js",
"chars": 916,
"preview": "const { Event } = require(\"klasa\");\nconst ServerLog = require(\"../lib/structures/ServerLog\");\n\nmodule.exports = class ex"
},
{
"path": "src/events/commandError.js",
"chars": 588,
"preview": "const { Event } = require(\"klasa\");\nconst Raven = require(\"raven\");\n\nmodule.exports = class extends Event {\n\n run(mes"
},
{
"path": "src/events/commandUnknown.js",
"chars": 1382,
"preview": "const { Event } = require(\"klasa\");\nconst Parser = require(\"breadtags\");\nconst { join } = require(\"path\");\n\nconst timeou"
},
{
"path": "src/events/debug.js",
"chars": 294,
"preview": "const { Event, config } = require(\"../index\");\n\nmodule.exports = class extends Event {\n\n constructor(...args) {\n "
},
{
"path": "src/events/disconnect.js",
"chars": 182,
"preview": "const { Event } = require(\"klasa\");\n\nmodule.exports = class extends Event {\n\n async run() {\n this.client.conso"
},
{
"path": "src/events/eventError.js",
"chars": 394,
"preview": "const { Event } = require(\"klasa\");\nconst Raven = require(\"raven\");\n\nmodule.exports = class extends Event {\n\n run(eve"
},
{
"path": "src/events/guildBanAdd.js",
"chars": 403,
"preview": "const { Event } = require(\"klasa\");\nconst ServerLog = require(\"../lib/structures/ServerLog\");\n\nmodule.exports = class ex"
},
{
"path": "src/events/guildBanRemove.js",
"chars": 410,
"preview": "const { Event } = require(\"klasa\");\nconst ServerLog = require(\"../lib/structures/ServerLog\");\n\nmodule.exports = class ex"
},
{
"path": "src/events/guildCreate.js",
"chars": 3176,
"preview": "const { Event, MessageEmbed } = require(\"../index\");\n\nmodule.exports = class extends Event {\n\n async run(guild) {\n "
},
{
"path": "src/events/guildDelete.js",
"chars": 171,
"preview": "const { Event } = require(\"klasa\");\n\nmodule.exports = class extends Event {\n\n async run() {\n this.client.dogst"
},
{
"path": "src/events/guildMemberAdd.js",
"chars": 2474,
"preview": "const { Event } = require(\"klasa\");\nconst ServerLog = require(\"../lib/structures/ServerLog\");\n\nmodule.exports = class ex"
},
{
"path": "src/events/guildMemberRemove.js",
"chars": 1682,
"preview": "const { Event } = require(\"klasa\");\nconst ServerLog = require(\"../lib/structures/ServerLog\");\n\nmodule.exports = class ex"
},
{
"path": "src/events/klasaReady.js",
"chars": 1014,
"preview": "const { Event, config } = require(\"../index\");\n\nmodule.exports = class extends Event {\n\n async run() {\n // Mem"
},
{
"path": "src/events/messageDelete.js",
"chars": 566,
"preview": "const { Event } = require(\"klasa\");\nconst ServerLog = require(\"../lib/structures/ServerLog\");\n\nmodule.exports = class ex"
},
{
"path": "src/events/messageDeleteBulk.js",
"chars": 497,
"preview": "const { Event } = require(\"klasa\");\nconst ServerLog = require(\"../lib/structures/ServerLog\");\n\nmodule.exports = class ex"
},
{
"path": "src/events/messageReactionAdd.js",
"chars": 3188,
"preview": "/* eslint-disable complexity */\nconst { Event } = require(\"klasa\");\nconst { MessageEmbed } = require(\"discord.js\");\n\nmod"
},
{
"path": "src/events/messageReactionRemove.js",
"chars": 2434,
"preview": "const { Event } = require(\"klasa\");\nconst { MessageEmbed } = require(\"discord.js\");\n\nmodule.exports = class extends Even"
},
{
"path": "src/events/messageUpdate.js",
"chars": 915,
"preview": "const { Event } = require(\"klasa\");\nconst ServerLog = require(\"../lib/structures/ServerLog\");\n\nmodule.exports = class ex"
},
{
"path": "src/events/reconnecting.js",
"chars": 182,
"preview": "const { Event } = require(\"klasa\");\n\nmodule.exports = class extends Event {\n\n async run() {\n this.client.conso"
},
{
"path": "src/events/resumed.js",
"chars": 175,
"preview": "const { Event } = require(\"klasa\");\n\nmodule.exports = class extends Event {\n\n run() {\n this.client.console.war"
},
{
"path": "src/events/roleCreate.js",
"chars": 401,
"preview": "const { Event } = require(\"klasa\");\nconst ServerLog = require(\"../lib/structures/ServerLog\");\n\nmodule.exports = class ex"
},
{
"path": "src/events/roleDelete.js",
"chars": 399,
"preview": "const { Event } = require(\"klasa\");\nconst ServerLog = require(\"../lib/structures/ServerLog\");\n\nmodule.exports = class ex"
},
{
"path": "src/events/shardError.js",
"chars": 178,
"preview": "const { Event } = require(\"klasa\");\n\nmodule.exports = class extends Event {\n\n async run(error, shardID) {\n thi"
},
{
"path": "src/extendables/fetchURL.js",
"chars": 590,
"preview": "const { Extendable, Piece, Util: { fetch } } = require(\"../index\");\n\nmodule.exports = class extends Extendable {\n\n co"
},
{
"path": "src/extendables/prompt.js",
"chars": 576,
"preview": "const { Extendable } = require(\"klasa\");\nconst { Message } = require(\"discord.js\");\n\nmodule.exports = class extends Exte"
},
{
"path": "src/finalizers/commandCounter.js",
"chars": 610,
"preview": "const { Finalizer } = require(\"klasa\");\n\nmodule.exports = class extends Finalizer {\n\n async run() {\n const r ="
},
{
"path": "src/functions/friendlyDuration.js",
"chars": 401,
"preview": "const { Function } = require(\"@kcp/functions\");\n\nmodule.exports = class extends Function {\n\n run(ms) {\n const "
},
{
"path": "src/functions/images.js",
"chars": 322,
"preview": "const { Function, config, util: { fetch } } = require(\"../index\");\n\nmodule.exports = class extends Function {\n\n run(e"
},
{
"path": "src/functions/isPatron.js",
"chars": 190,
"preview": "const { Function } = require(\"@kcp/functions\");\n\nmodule.exports = class extends Function {\n\n run(guild) {\n ret"
},
{
"path": "src/functions/isUpvoter.js",
"chars": 250,
"preview": "const { Function } = require(\"@kcp/functions\");\n\nmodule.exports = class extends Function {\n\n run(user) {\n cons"
},
{
"path": "src/functions/randomNumber.js",
"chars": 489,
"preview": "const { Function } = require(\"@kcp/functions\");\n\nmodule.exports = class extends Function {\n\n run(min, max) {\n "
},
{
"path": "src/functions/scrapeSubreddit.js",
"chars": 698,
"preview": "const { util: { fetch }, Function } = require(\"../index\");\n\nmodule.exports = class extends Function {\n\n async run(sub"
},
{
"path": "src/index.js",
"chars": 789,
"preview": "const klasa = require(\"klasa\");\nconst discord = require(\"discord.js\");\nconst klasaApi = require(\"klasa-api\");\nconst klas"
},
{
"path": "src/inhibitors/disabledGroup.js",
"chars": 429,
"preview": "const { Inhibitor } = require(\"klasa\");\n\nmodule.exports = class extends Inhibitor {\n\n constructor(...args) {\n "
},
{
"path": "src/inhibitors/patronOnly.js",
"chars": 351,
"preview": "const { Inhibitor } = require(\"../index\");\n\nmodule.exports = class extends Inhibitor {\n\n constructor(...args) {\n "
},
{
"path": "src/inhibitors/requireDJ.js",
"chars": 562,
"preview": "const { Inhibitor } = require(\"klasa\");\n\nmodule.exports = class extends Inhibitor {\n\n constructor(...args) {\n "
},
{
"path": "src/inhibitors/requireMusic.js",
"chars": 822,
"preview": "const { Inhibitor } = require(\"klasa\");\n\nmodule.exports = class extends Inhibitor {\n\n constructor(...args) {\n "
},
{
"path": "src/inhibitors/upvoterOnly.js",
"chars": 426,
"preview": "const { Inhibitor } = require(\"../index\");\n\nmodule.exports = class extends Inhibitor {\n\n constructor(...args) {\n "
},
{
"path": "src/languages/en-US.js",
"chars": 37244,
"preview": "const { Language, klasaUtil: util, version, Duration } = require(\"../index\");\n\nmodule.exports = class extends Language {"
},
{
"path": "src/languages/es-ES.js",
"chars": 36427,
"preview": "const { Language, klasaUtil: util, version, Duration } = require(\"../index\");\n\nmodule.exports = class extends Language {"
},
{
"path": "src/languages/fr-FR.js",
"chars": 37665,
"preview": "const { Language, klasaUtil: util, version, Duration } = require(\"../index\");\n\nmodule.exports = class extends Language {"
}
]
// ... and 40 more files (download for full content)
About this extraction
This page contains the full source code of the AdityaTD/PenguBot GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 240 files (670.3 KB), approximately 168.8k tokens, and a symbol index with 515 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.
Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.