0.2.11 • Published 6 years ago
idiotic-api v0.2.11
Idiotic API
All Examples are based on Discord.js version 12, to back port it just remove ({ format: "ABC", size: XYZ })
from all avatar URL lines.
You'll want to declare this somewhere central, so maybe attach it to the client.
const Idiot = require("idiotic-api");
client.API = new Idiot.Client("your-token-here");
If you want to use the developer endpoint, you'll need to add { dev: true }
to your new Idiot Client like so.
client.API = new Idiot.Client("your-token-here", { dev: true });
Command Based Endpoints
Achievement
await message.channel.send(new MessageAttachment(
await client.API.achievement(message.author.displayAvatarURL({ format: "png", size: 32 }), args.join(" ")),
"achievement.png"));
Example:
Bat Slap
await message.channel.send(new MessageAttachment(
await client.API.batSlap(message.author.displayAvatarURL({ format: "png", size: 128 }),
message.mentions.users.first().displayAvatarURL({ format: "png", size: 128 })),
"batslap.png"));
Example:
Wanted
await message.channel.send(new MessageAttachment(
await client.API.wanted(message.author.displayAvatarURL({ format: "png", size: 128 })),
"wanted.png"));
Example:
pls
await message.channel.send(new MessageAttachment(
await client.API.pls((message.mentions.members.first() || message.member).displayName),
"pls.png"));
Example:
Greeting/Farewell Based Endpoints
Anime Welcome Placed inside your GuildMemberAdd event
await client.API.welcome("anime", member.user.bot, member.user.displayAvatarURL({ format: "png", size: 128 }), member.user.tag,`${member.guild.name}#${member.guild.memberCount}`);
Example:
0.2.11
6 years ago
0.2.10
6 years ago
0.2.9
6 years ago
0.2.8
6 years ago
0.2.7
6 years ago
0.2.6
6 years ago
0.2.4
6 years ago
0.2.3
6 years ago
0.2.2
6 years ago
0.2.1
6 years ago
0.2.0
6 years ago
0.1.9
6 years ago
0.1.8
6 years ago
0.1.7
6 years ago
0.1.6
6 years ago
0.0.7
6 years ago
0.0.6
6 years ago
0.0.5
6 years ago
0.0.4
6 years ago
0.0.3
6 years ago
0.0.2
6 years ago
0.0.1
6 years ago