mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-03 23:36:43 +02:00
Pogchamp Command
This commit is contained in:
@@ -227,7 +227,7 @@ in the appropriate channel's topic to use it.
|
||||
|
||||
## Commands
|
||||
|
||||
Total: 475
|
||||
Total: 476
|
||||
|
||||
### Utility:
|
||||
|
||||
@@ -650,6 +650,7 @@ Total: 475
|
||||
* **nike-ad:** Sends a "Believe in Something" Nike Ad meme with the text of your choice.
|
||||
* **phoebe-teaching-joey:** Sends a "Phoebe Teaching Joey" meme with text of your choice.
|
||||
* **plankton-plan:** Sends a Plankton's Plan meme with steps of your choice.
|
||||
* **pogchamp:** Sends a pogchamp duplicated however many times you want.
|
||||
* **scroll-of-truth:** Sends a "Scroll of Truth" meme with the text of your choice.
|
||||
* **skyrim-skill:** Sends a "Skyrim Skill" meme with the skill and image of your choice.
|
||||
* **sora-selfie:** Draws an image or a user's avatar behind Sora taking a selfie.
|
||||
@@ -1257,6 +1258,7 @@ here.
|
||||
* dislike (Concept)
|
||||
* hentai (Original Subreddit List)
|
||||
* like (Concept)
|
||||
* pogchamp (Concept)
|
||||
* porn (Original Subreddit List)
|
||||
* simp (Concept)
|
||||
* worse-than-hitler (Concept)
|
||||
@@ -1346,6 +1348,8 @@ here.
|
||||
* rotten-tomatoes (API)
|
||||
- [rrrather](https://www.rrrather.com/)
|
||||
* would-you-rather ([API](https://www.rrrather.com/botapi))
|
||||
- [Ryan Gutierrez](https://twitter.com/gootecks)
|
||||
* pogchamp (Image)
|
||||
- [Safebooru](https://safebooru.org/)
|
||||
* safebooru (API)
|
||||
- [Serebii.net](https://www.serebii.net/index2.shtml)
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 20 KiB |
@@ -0,0 +1,56 @@
|
||||
const Command = require('../../structures/Command');
|
||||
const { createCanvas, loadImage } = require('canvas');
|
||||
const path = require('path');
|
||||
|
||||
module.exports = class PogchampCommand extends Command {
|
||||
constructor(client) {
|
||||
super(client, {
|
||||
name: 'pogchamp',
|
||||
aliases: ['pog'],
|
||||
group: 'edit-meme',
|
||||
memberName: 'pogchamp',
|
||||
description: 'Sends a pogchamp duplicated however many times you want.',
|
||||
throttling: {
|
||||
usages: 1,
|
||||
duration: 30
|
||||
},
|
||||
clientPermissions: ['ATTACH_FILES'],
|
||||
credit: [
|
||||
{
|
||||
name: 'Ryan Gutierrez',
|
||||
url: 'https://twitter.com/gootecks',
|
||||
reason: 'Image'
|
||||
},
|
||||
{
|
||||
name: 'Overtime2005',
|
||||
url: 'https://github.com/Overtime2005',
|
||||
reason: 'Concept'
|
||||
}
|
||||
],
|
||||
args: [
|
||||
{
|
||||
key: 'amount',
|
||||
prompt: 'How many times do you want to duplicate the pogchamp?',
|
||||
type: 'integer',
|
||||
max: 100,
|
||||
min: 1
|
||||
}
|
||||
]
|
||||
});
|
||||
}
|
||||
|
||||
async run(msg, { amount }) {
|
||||
const pog = await loadImage(path.join(__dirname, '..', '..', 'assets', 'images', 'pogchamp.png'));
|
||||
const rows = Math.ceil(amount / 10);
|
||||
const canvas = createCanvas(pog.width * (rows > 1 ? 10 : amount), pog.height * rows);
|
||||
const ctx = canvas.getContext('2d');
|
||||
let width = 0;
|
||||
for (let i = 0; i < amount; i++) {
|
||||
const row = Math.ceil((i + 1) / 10);
|
||||
ctx.drawImage(pog, width, pog.height * (row - 1));
|
||||
if ((width + pog.width) === (pog.width * (rows > 1 ? 10 : amount))) width = 0;
|
||||
else width += pog.width;
|
||||
}
|
||||
return msg.say({ files: [{ attachment: canvas.toBuffer(), name: 'pogchamp.png' }] });
|
||||
}
|
||||
};
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "xiao",
|
||||
"version": "116.18.0",
|
||||
"version": "116.19.0",
|
||||
"description": "Your personal server companion.",
|
||||
"main": "Xiao.js",
|
||||
"scripts": {
|
||||
|
||||
Reference in New Issue
Block a user