discord-motto
Version:
Welcome to Discord Motto, a simple and easy to use package to set a server motto.
78 lines (60 loc) • 1.82 kB
Markdown
Discord Motto is a simple [Node.js](https://nodejs.org/) module that lets you easily manage custom mottos for your discord bot
- Unlimited servers
- Default motto
- Super fast
- 100% Reliable
- Fast Support
**Note:** All data is reliably stored in an SQLite database.
```
npm i discord-motto
```
For use with discord.js
```js
const Discord = require('discord.js');
const client = new Discord.Client();
const prefix = require('discord-motto');
//if the server doesn't have a set motto yet
let defaultMotto = 'Welcome to my server!';
client.on('message' (message) => {
//get the motto for the discord server
let guildMotto = prefix.getPrefix(message.guild.id);
//set motto to the default prefix if there isn't one
if (!guildMotto) guildMotto = defaultMotto;
});
client.login('token');
```
**setMotto**
Set the motto into the database for a server:
```js
const motto = require('discord-motto');
motto.setMotto('motto', 'guild_id');
```
**getMotto**
Getting a motto from the database:
```js
const motto = require('discord-motto');
motto.setMotto('motto', 'guild_id');
console.log(prefix.getMotto('guild_id'));
// -> !
```
**setMotto**
Setting the default motto
```js
const motto = require('discord-motto')
//Specify no server to change the default motto.
motto.setPrefix('Welcome to my server!');
//Specify no server to get the default motto.
console.log(motto.getMotto());
// -> !
```
- Docs (coming soon)
- [Discord.js Module](https://www.npmjs.com/package/discord.js)
- [Discord.js Docs](https://discord.js.org)
- [GitHub](https://github.com/QubieDiscord)
- [Support Server](https://discord.gg/ZzcbRMahsG)
- [Node.js](https://nodejs.org/)