Skip to content

Commit

Permalink
🏷 5.2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Nico105 committed Jun 5, 2022
2 parents 08b0a41 + b5c8bbf commit b2b5d69
Show file tree
Hide file tree
Showing 19 changed files with 875 additions and 697 deletions.
28 changes: 16 additions & 12 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,25 +23,29 @@
"no-restricted-globals": [
"error",
{
"name": "Buffer",
"message": "Import Buffer from `node:buffer` instead"
"name": "Buffer",
"message": "Import Buffer from `node:buffer` instead"
},
{
"name": "process",
"message": "Import process from `node:process` instead"
"name": "process",
"message": "Import process from `node:process` instead"
},
{
"name": "setTimeout",
"message": "Import setTimeout from `node:timers` instead"
"name": "setTimeout",
"message": "Import setTimeout from `node:timers` instead"
},
{
"name": "setInterval",
"message": "Import setInterval from `node:timers` instead"
"name": "setInterval",
"message": "Import setInterval from `node:timers` instead"
},
{
"name": "setImmediate",
"message": "Import setImmediate from `node:timers` instead"
"name": "setImmediate",
"message": "Import setImmediate from `node:timers` instead"
},
{
"name": "clearTimeout",
"message": "Import clearTimeout from `node:timers` instead"
}
]
]
}
}
}
349 changes: 157 additions & 192 deletions README.md

Large diffs are not rendered by default.

6 changes: 0 additions & 6 deletions esm.mjs

This file was deleted.

5 changes: 5 additions & 0 deletions examples/custom-databases/.eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"rules": {
"no-restricted-globals": "off"
}
}
22 changes: 9 additions & 13 deletions examples/custom-databases/enmap.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,10 @@
const Discord = require('discord.js'),
client = new Discord.Client({
intents: [
Discord.Intents.FLAGS.GUILDS,
Discord.Intents.FLAGS.GUILD_MESSAGE_REACTIONS
]
}),
settings = {
prefix: 'g!',
token: 'Your Discord Bot Token'
};
const Discord = require('discord.js');
const client = new Discord.Client({
intents: [
Discord.Intents.FLAGS.GUILDS,
Discord.Intents.FLAGS.GUILD_MESSAGE_REACTIONS
]
});

// Load Enmap
const Enmap = require('enmap');
Expand Down Expand Up @@ -62,7 +58,7 @@ const manager = new GiveawayManagerWithOwnDatabase(client, {
client.giveawaysManager = manager;

client.on('ready', () => {
console.log('I\'m ready!');
console.log('Bot is ready!');
});

client.login(settings.token);
client.login(process.env.DISCORD_BOT_TOKEN);
23 changes: 10 additions & 13 deletions examples/custom-databases/mongoose.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,10 @@
const Discord = require('discord.js'),
client = new Discord.Client({
intents: [
Discord.Intents.FLAGS.GUILDS,
Discord.Intents.FLAGS.GUILD_MESSAGE_REACTIONS
]
}),
settings = {
prefix: 'g!',
token: 'Your Discord Bot Token'
};
const Discord = require('discord.js');
const client = new Discord.Client({
intents: [
Discord.Intents.FLAGS.GUILDS,
Discord.Intents.FLAGS.GUILD_MESSAGE_REACTIONS
]
});

// Connect to the database
const mongoose = require('mongoose');
Expand Down Expand Up @@ -45,6 +41,7 @@ const giveawaySchema = new mongoose.Schema({
hostedBy: String
},
thumbnail: String,
image: String,
hostedBy: String,
winnerIds: { type: [String], default: undefined },
reaction: mongoose.Mixed,
Expand Down Expand Up @@ -126,7 +123,7 @@ const manager = new GiveawayManagerWithOwnDatabase(client, {
client.giveawaysManager = manager;

client.on('ready', () => {
console.log('I\'m ready!');
console.log('Bot is ready!');
});

client.login(settings.token);
client.login(process.env.DISCORD_BOT_TOKEN);
22 changes: 9 additions & 13 deletions examples/custom-databases/mysql.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,10 @@
const Discord = require('discord.js'),
client = new Discord.Client({
intents: [
Discord.Intents.FLAGS.GUILDS,
Discord.Intents.FLAGS.GUILD_MESSAGE_REACTIONS
]
}),
settings = {
prefix: 'g!',
token: 'Your Discord Bot Token'
};
const Discord = require('discord.js');
const client = new Discord.Client({
intents: [
Discord.Intents.FLAGS.GUILDS,
Discord.Intents.FLAGS.GUILD_MESSAGE_REACTIONS
]
});

// Load mysql
const MySQL = require('mysql');
Expand Down Expand Up @@ -121,7 +117,7 @@ const manager = new GiveawayManagerWithOwnDatabase(client, {
client.giveawaysManager = manager;

client.on('ready', () => {
console.log('I\'m ready!');
console.log('Bot is ready!');
});

client.login(settings.token);
client.login(process.env.DISCORD_BOT_TOKEN);
22 changes: 9 additions & 13 deletions examples/custom-databases/nano.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,10 @@
const Discord = require('discord.js'),
client = new Discord.Client({
intents: [
Discord.Intents.FLAGS.GUILDS,
Discord.Intents.FLAGS.GUILD_MESSAGE_REACTIONS
]
}),
settings = {
prefix: 'g!',
token: 'Your Discord Bot Token'
};
const Discord = require('discord.js');
const client = new Discord.Client({
intents: [
Discord.Intents.FLAGS.GUILDS,
Discord.Intents.FLAGS.GUILD_MESSAGE_REACTIONS
]
});

// Load nano
const nano = require('nano')('http://admin:mypassword@localhost:5984');
Expand Down Expand Up @@ -72,7 +68,7 @@ const manager = new GiveawayManagerWithOwnDatabase(client, {
client.giveawaysManager = manager;

client.on('ready', () => {
console.log('I\'m ready!');
console.log('Bot is ready!');
});

client.login(settings.token);
client.login(process.env.DISCORD_BOT_TOKEN);
22 changes: 9 additions & 13 deletions examples/custom-databases/quick.db.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,10 @@
const Discord = require('discord.js'),
client = new Discord.Client({
intents: [
Discord.Intents.FLAGS.GUILDS,
Discord.Intents.FLAGS.GUILD_MESSAGE_REACTIONS
]
}),
settings = {
prefix: 'g!',
token: 'Your Discord Bot Token'
};
const Discord = require('discord.js');
const client = new Discord.Client({
intents: [
Discord.Intents.FLAGS.GUILDS,
Discord.Intents.FLAGS.GUILD_MESSAGE_REACTIONS
]
});

// Load quick.db
const db = require('quick.db');
Expand Down Expand Up @@ -70,7 +66,7 @@ const manager = new GiveawayManagerWithOwnDatabase(client, {
client.giveawaysManager = manager;

client.on('ready', () => {
console.log('I\'m ready!');
console.log('Bot is ready!');
});

client.login(settings.token);
client.login(process.env.DISCORD_BOT_TOKEN);
22 changes: 9 additions & 13 deletions examples/custom-databases/quick.replit.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,10 @@
const Discord = require('discord.js'),
client = new Discord.Client({
intents: [
Discord.Intents.FLAGS.GUILDS,
Discord.Intents.FLAGS.GUILD_MESSAGE_REACTIONS
]
}),
settings = {
prefix: 'g!',
token: 'Your Discord Bot Token'
};
const Discord = require('discord.js');
const client = new Discord.Client({
intents: [
Discord.Intents.FLAGS.GUILDS,
Discord.Intents.FLAGS.GUILD_MESSAGE_REACTIONS
]
});

// Load quick.replit
const { Database } = require('quick.replit');
Expand Down Expand Up @@ -77,7 +73,7 @@ const manager = new GiveawayManagerWithOwnDatabase(client, {
client.giveawaysManager = manager;

client.on('ready', () => {
console.log('I\'m ready!');
console.log('Bot is ready!');
});

client.login(settings.token);
client.login(process.env.DISCORD_BOT_TOKEN);
22 changes: 9 additions & 13 deletions examples/custom-databases/quickmongo.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,10 @@
const Discord = require('discord.js'),
client = new Discord.Client({
intents: [
Discord.Intents.FLAGS.GUILDS,
Discord.Intents.FLAGS.GUILD_MESSAGE_REACTIONS
]
}),
settings = {
prefix: 'g!',
token: 'Your Discord Bot Token'
};
const Discord = require('discord.js');
const client = new Discord.Client({
intents: [
Discord.Intents.FLAGS.GUILDS,
Discord.Intents.FLAGS.GUILD_MESSAGE_REACTIONS
]
});

// Load quickmongo
const { Database } = require('quickmongo');
Expand Down Expand Up @@ -63,7 +59,7 @@ const manager = new GiveawayManagerWithOwnDatabase(client, {
client.giveawaysManager = manager;

client.on('ready', () => {
console.log('I\'m ready!');
console.log('Bot is ready!');
});

client.login(settings.token);
client.login(process.env.DISCORD_BOT_TOKEN);
22 changes: 9 additions & 13 deletions examples/custom-databases/replit.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,10 @@
const Discord = require('discord.js'),
client = new Discord.Client({
intents: [
Discord.Intents.FLAGS.GUILDS,
Discord.Intents.FLAGS.GUILD_MESSAGE_REACTIONS
]
}),
settings = {
prefix: 'g!',
token: 'Your Discord Bot Token'
};
const Discord = require('discord.js');
const client = new Discord.Client({
intents: [
Discord.Intents.FLAGS.GUILDS,
Discord.Intents.FLAGS.GUILD_MESSAGE_REACTIONS
]
});

// Load Replit Database
const Database = require('@replit/database');
Expand Down Expand Up @@ -77,7 +73,7 @@ const manager = new GiveawayManagerWithOwnDatabase(client, {
client.giveawaysManager = manager;

client.on('ready', () => {
console.log('I\'m ready!');
console.log('Bot is ready!');
});

client.login(settings.token);
client.login(process.env.DISCORD_BOT_TOKEN);
40 changes: 0 additions & 40 deletions examples/sharding.js

This file was deleted.

7 changes: 3 additions & 4 deletions index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
module.exports = {
version: require('./package.json').version,
GiveawaysManager: require('./src/Manager')
};
exports.version = require('./package.json').version;
exports.GiveawaysManager = require('./src/Manager');
exports.Giveaway = require('./src/Giveaway');
Loading

0 comments on commit b2b5d69

Please sign in to comment.