discord-turtle
v3.1.0
Published
> Discord Turtle is a package that can do lots of stuff, like embed pages!
Downloads
17
Maintainers
Readme
Discord Turtle is a package that can do lots of stuff, like embed pages!
Table Of Content
Installation
$ npm i discord-turtle
Make sure you have discord.js
installed!
To install Discord V13 do
npm i discord.js@dev
Examples
Discord.js Docs
const Discord = require("discord.js");
const dt = require('discord-turtle');
const docs = await dt.docs('MessageEmbed');
const docsembed = new Discord.MessageEmbed(docs);
message.channel.send(docsembed);
Timestamps
const dt = require('discord-turtle');
const time = new dt.timestamp()
time.setStyle('f')
message.channel.send({ content: time.toTimestamp() });
Magik
const dt = require('discord-turtle');
new dt.magik({
mentions: <message>.mentions,
author: <message>.author
}).create().then(button => {
<channel>.send({ embeds: [button.embed.setColor('BLURPLE')] })
})
V13 Examples
Link
You must be on Discord.js V13
new dt.linkbutton({
link: 'https://discord.com',
label: 'Discord.com'
}).create().then(button => {
<channel>.send({ content: 'Hey!', components: [[button]] })
})
Pages
You must be on Discord.js V13
const Discord = require("discord.js");
const dt = require('discord-turtle');
const page_1 = new Discord.MessageEmbed()
.setTitle('Page 1')
const page_2 = new Discord.MessageEmbed()
.setTitle('Page 2')
new dt.pages({
pages: [page_1, page_2],
emoji: ['emojiid', 'emojiid', 'emojiid'],
message: message,
style: 'SECONDARY'
}).build();
RPS
You must be on Discord.js V13
const dt = require('discord-turtle');
const rpsgame = new dt.rps();
rpsgame.setMessage(message)
rpsgame.start();