mirror of
https://github.com/Hessenuk/DiscordTickets.git
synced 2025-09-02 08:41:25 +03:00
v2 rewrite with discord.js@v12 support. Now with SQLite or MySQL storage.
Code is at least 80% less bad.
This commit is contained in:
22
src/utils/archive.js
Normal file
22
src/utils/archive.js
Normal file
@@ -0,0 +1,22 @@
|
||||
/**
|
||||
*
|
||||
* @name DiscordTickets
|
||||
* @author eartharoid <contact@eartharoid.me>
|
||||
* @license GNU-GPLv3
|
||||
*
|
||||
*/
|
||||
|
||||
const ChildLogger = require('leekslazylogger').ChildLogger;
|
||||
const log = new ChildLogger();
|
||||
|
||||
module.exports.create = (client, channel) => {
|
||||
|
||||
};
|
||||
|
||||
module.exports.addUser = (client, channel, user) => {
|
||||
|
||||
};
|
||||
|
||||
module.exports.addMessage = (client, channel, message) => {
|
||||
|
||||
};
|
31
src/utils/banner.js
Normal file
31
src/utils/banner.js
Normal file
@@ -0,0 +1,31 @@
|
||||
/**
|
||||
*
|
||||
* @name DiscordTickets
|
||||
* @author eartharoid <contact@eartharoid.me>
|
||||
* @license GNU-GPLv3
|
||||
*
|
||||
*/
|
||||
|
||||
const { version, homepage } = require('../../package.json');
|
||||
module.exports = (leeks) => {
|
||||
console.log(leeks.colours.cyan(`
|
||||
######## #### ###### ###### ####### ######## ########
|
||||
## ## ## ## ## ## ## ## ## ## ## ## ##
|
||||
## ## ## ## ## ## ## ## ## ## ##
|
||||
## ## ## ###### ## ## ## ######## ## ##
|
||||
## ## ## ## ## ## ## ## ## ## ##
|
||||
## ## ## ## ## ## ## ## ## ## ## ## ##
|
||||
######## #### ###### ###### ####### ## ## ########
|
||||
|
||||
######## #### ###### ## ## ######## ######## ######
|
||||
## ## ## ## ## ## ## ## ## ##
|
||||
## ## ## ## ## ## ## ##
|
||||
## ## ## ##### ###### ## ######
|
||||
## ## ## ## ## ## ## ##
|
||||
## ## ## ## ## ## ## ## ## ##
|
||||
## #### ###### ## ## ######## ## ######
|
||||
`));
|
||||
console.log(leeks.colours.cyanBright(`DiscordTickets bot v${version} by eartharoid`));
|
||||
console.log(leeks.colours.cyanBright(homepage));
|
||||
console.log('\n\n');
|
||||
};
|
31
src/utils/updater.js
Normal file
31
src/utils/updater.js
Normal file
@@ -0,0 +1,31 @@
|
||||
/**
|
||||
*
|
||||
* @name DiscordTickets
|
||||
* @author eartharoid <contact@eartharoid.me>
|
||||
* @license GNU-GPLv3
|
||||
*
|
||||
*/
|
||||
|
||||
const ChildLogger = require('leekslazylogger').ChildLogger;
|
||||
const log = new ChildLogger();
|
||||
const fetch = require('node-fetch');
|
||||
const config = require('../../user/config');
|
||||
let {version} = require('../../package.json');
|
||||
version = 'v' + version;
|
||||
|
||||
module.exports = () => {
|
||||
if(!config.updater)
|
||||
return;
|
||||
|
||||
fetch('https://api.github.com/repos/eartharoid/DiscordTickets/releases')
|
||||
.then(res => res.json())
|
||||
.then(json => {
|
||||
const update = json[0];
|
||||
|
||||
if (version !== update.tag_name) {
|
||||
log.notice('There is an update available for Discord Tickets');
|
||||
log.info(`Download "&f${update.name}&3" from &6https://github.com/eartharoid/DiscordTickets/releases/`);
|
||||
log.notice(`You currently have ${version}; The latest is ${update.tag_name}`);
|
||||
}
|
||||
});
|
||||
};
|
Reference in New Issue
Block a user