Fixed some DM command issues, made reload and restart use IPC
This commit is contained in:
parent
e0e0c9c7d4
commit
56113a1cf8
18 changed files with 54 additions and 35 deletions
|
@ -3,7 +3,7 @@ const Command = require("../../classes/command.js");
|
|||
|
||||
class BirdCommand extends Command {
|
||||
async run() {
|
||||
this.message.channel.sendTyping();
|
||||
this.client.sendChannelTyping(this.message.channel.id);
|
||||
const imageData = await fetch("http://shibe.online/api/birds");
|
||||
const json = await imageData.json();
|
||||
return {
|
||||
|
|
|
@ -3,7 +3,7 @@ const Command = require("../../classes/command.js");
|
|||
|
||||
class CatCommand extends Command {
|
||||
async run() {
|
||||
this.message.channel.sendTyping();
|
||||
this.client.sendChannelTyping(this.message.channel.id);
|
||||
const data = await fetch("https://projectlounge.pw/cta/", { redirect: "manual" });
|
||||
return {
|
||||
embed: {
|
||||
|
|
|
@ -3,7 +3,7 @@ const Command = require("../../classes/command.js");
|
|||
|
||||
class DogCommand extends Command {
|
||||
async run() {
|
||||
this.message.channel.sendTyping();
|
||||
this.client.sendChannelTyping(this.message.channel.id);
|
||||
const imageData = await fetch("https://dog.ceo/api/breeds/image/random");
|
||||
const json = await imageData.json();
|
||||
return {
|
||||
|
|
|
@ -4,7 +4,7 @@ const Command = require("../../classes/command.js");
|
|||
class MCCommand extends Command {
|
||||
async run() {
|
||||
if (this.args.length === 0) return `${this.message.author.mention}, you need to provide some text to generate a Minecraft achievement!`;
|
||||
this.message.channel.sendTyping();
|
||||
this.client.sendChannelTyping(this.message.channel.id);
|
||||
const request = await fetch(`https://www.minecraftskinstealer.com/achievement/a.php?i=13&h=Achievement+get%21&t=${encodeURIComponent(this.args.join("+"))}`);
|
||||
return {
|
||||
file: await request.buffer(),
|
||||
|
|
|
@ -5,7 +5,7 @@ const Command = require("../../classes/command.js");
|
|||
class RetroCommand extends Command {
|
||||
async run() {
|
||||
if (this.args.length === 0) return `${this.message.author.mention}, you need to provide some text to generate some retro text!`;
|
||||
this.message.channel.sendTyping();
|
||||
this.client.sendChannelTyping(this.message.channel.id);
|
||||
let [line1, line2, line3] = this.args.join(" ").replaceAll("&", "\\&").replaceAll(">", "\\>").replaceAll("<", "\\<").replaceAll("\"", "\\"").replaceAll("'", "\\'").replaceAll("%", "\\%").split(",").map(elem => elem.trim());
|
||||
if (!line2 && line1.length > 15) {
|
||||
const [split1, split2, split3] = wrap(line1, { width: 15, indent: "" }).split("\n");
|
||||
|
|
|
@ -3,7 +3,7 @@ const Command = require("../../classes/command.js");
|
|||
|
||||
class WikihowCommand extends Command {
|
||||
async run() {
|
||||
this.message.channel.sendTyping();
|
||||
this.client.sendChannelTyping(this.message.channel.id);
|
||||
const request = await fetch("https://hargrimm-wikihow-v1.p.rapidapi.com/images?count=1", {
|
||||
headers: {
|
||||
"X-RapidAPI-Key": process.env.MASHAPE,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue