mirror of
https://github.com/Hessenuk/DiscordTickets.git
synced 2024-11-05 04:13:08 +02:00
Logger & presence activities
This commit is contained in:
parent
93d332f898
commit
5846b88db2
3
.gitignore
vendored
3
.gitignore
vendored
@ -5,4 +5,5 @@ user/dev.config.js
|
||||
user/storage.db
|
||||
user/transcripts/text/*.txt
|
||||
user/transcripts/raw/*.log
|
||||
user/transcripts/raw/entities/*.json
|
||||
user/transcripts/raw/entities/*.json
|
||||
*.code-workspace
|
||||
|
2
package-lock.json
generated
2
package-lock.json
generated
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@eartharoid/discordtickets",
|
||||
"version": "2.0.1",
|
||||
"version": "2.0.2",
|
||||
"lockfileVersion": 1,
|
||||
"requires": true,
|
||||
"dependencies": {
|
||||
|
@ -7,8 +7,8 @@
|
||||
*/
|
||||
|
||||
const { MessageEmbed } = require('discord.js');
|
||||
const ChildLogger = require('leekslazylogger').ChildLogger;
|
||||
const log = new ChildLogger();
|
||||
const Logger = require('leekslazylogger');
|
||||
const log = new Logger();
|
||||
|
||||
module.exports = {
|
||||
name: 'add',
|
||||
|
@ -6,8 +6,8 @@
|
||||
*
|
||||
*/
|
||||
|
||||
const ChildLogger = require('leekslazylogger').ChildLogger;
|
||||
const log = new ChildLogger();
|
||||
const Logger = require('leekslazylogger');
|
||||
const log = new Logger();
|
||||
const {
|
||||
MessageEmbed
|
||||
} = require('discord.js');
|
||||
|
@ -6,8 +6,8 @@
|
||||
*
|
||||
*/
|
||||
|
||||
const ChildLogger = require('leekslazylogger').ChildLogger;
|
||||
const log = new ChildLogger();
|
||||
const Logger = require('leekslazylogger');
|
||||
const log = new Logger();
|
||||
const {
|
||||
MessageEmbed
|
||||
} = require('discord.js');
|
||||
|
@ -6,8 +6,8 @@
|
||||
*
|
||||
*/
|
||||
|
||||
const ChildLogger = require('leekslazylogger').ChildLogger;
|
||||
const log = new ChildLogger();
|
||||
const Logger = require('leekslazylogger');
|
||||
const log = new Logger();
|
||||
const { MessageEmbed } = require('discord.js');
|
||||
|
||||
module.exports = {
|
||||
|
@ -6,8 +6,8 @@
|
||||
*
|
||||
*/
|
||||
|
||||
const ChildLogger = require('leekslazylogger').ChildLogger;
|
||||
const log = new ChildLogger();
|
||||
const Logger = require('leekslazylogger');
|
||||
const log = new Logger();
|
||||
const { MessageEmbed } = require('discord.js');
|
||||
const fs = require('fs');
|
||||
|
||||
|
@ -6,8 +6,8 @@
|
||||
*
|
||||
*/
|
||||
|
||||
const ChildLogger = require('leekslazylogger').ChildLogger;
|
||||
const log = new ChildLogger();
|
||||
const Logger = require('leekslazylogger');
|
||||
const log = new Logger();
|
||||
const { MessageEmbed } = require('discord.js');
|
||||
|
||||
module.exports = {
|
||||
|
@ -7,8 +7,8 @@
|
||||
*/
|
||||
|
||||
const { MessageEmbed } = require('discord.js');
|
||||
const ChildLogger = require('leekslazylogger').ChildLogger;
|
||||
const log = new ChildLogger();
|
||||
const Logger = require('leekslazylogger');
|
||||
const log = new Logger();
|
||||
|
||||
module.exports = {
|
||||
name: 'remove',
|
||||
|
@ -6,8 +6,8 @@
|
||||
*
|
||||
*/
|
||||
|
||||
const ChildLogger = require('leekslazylogger').ChildLogger;
|
||||
const log = new ChildLogger();
|
||||
const Logger = require('leekslazylogger');
|
||||
const log = new Logger();
|
||||
|
||||
module.exports = {
|
||||
event: 'debug',
|
||||
|
@ -6,8 +6,8 @@
|
||||
*
|
||||
*/
|
||||
|
||||
const ChildLogger = require('leekslazylogger').ChildLogger;
|
||||
const log = new ChildLogger();
|
||||
const Logger = require('leekslazylogger');
|
||||
const log = new Logger();
|
||||
|
||||
module.exports = {
|
||||
event: 'error',
|
||||
|
@ -7,8 +7,8 @@
|
||||
*/
|
||||
|
||||
const { Collection, MessageEmbed } = require('discord.js');
|
||||
const ChildLogger = require('leekslazylogger').ChildLogger;
|
||||
const log = new ChildLogger();
|
||||
const Logger = require('leekslazylogger');
|
||||
const log = new Logger();
|
||||
const archive = require('../modules/archive');
|
||||
|
||||
module.exports = {
|
||||
|
@ -6,8 +6,8 @@
|
||||
*
|
||||
*/
|
||||
|
||||
const ChildLogger = require('leekslazylogger').ChildLogger;
|
||||
const log = new ChildLogger();
|
||||
const Logger = require('leekslazylogger');
|
||||
const log = new Logger();
|
||||
const fs = require('fs');
|
||||
|
||||
module.exports = {
|
||||
|
@ -6,8 +6,8 @@
|
||||
*
|
||||
*/
|
||||
|
||||
const ChildLogger = require('leekslazylogger').ChildLogger;
|
||||
const log = new ChildLogger();
|
||||
const Logger = require('leekslazylogger');
|
||||
const log = new Logger();
|
||||
const { MessageEmbed } = require('discord.js');
|
||||
const fs = require('fs');
|
||||
|
||||
|
@ -6,8 +6,8 @@
|
||||
*
|
||||
*/
|
||||
|
||||
const ChildLogger = require('leekslazylogger').ChildLogger;
|
||||
const log = new ChildLogger();
|
||||
const Logger = require('leekslazylogger');
|
||||
const log = new Logger();
|
||||
const fs = require('fs');
|
||||
|
||||
module.exports = {
|
||||
|
@ -6,8 +6,8 @@
|
||||
*
|
||||
*/
|
||||
|
||||
const ChildLogger = require('leekslazylogger').ChildLogger;
|
||||
const log = new ChildLogger();
|
||||
const Logger = require('leekslazylogger');
|
||||
const log = new Logger();
|
||||
|
||||
module.exports = {
|
||||
event: 'rateLimit',
|
||||
|
@ -6,8 +6,8 @@
|
||||
*
|
||||
*/
|
||||
|
||||
const ChildLogger = require('leekslazylogger').ChildLogger;
|
||||
const log = new ChildLogger();
|
||||
const Logger = require('leekslazylogger');
|
||||
const log = new Logger();
|
||||
const config = require('../../user/' + require('../').config);
|
||||
|
||||
module.exports = {
|
||||
@ -16,14 +16,16 @@ module.exports = {
|
||||
log.success(`Authenticated as ${client.user.tag}`);
|
||||
|
||||
const updatePresence = () => {
|
||||
let num = Math.floor(Math.random() * config.activities.length);
|
||||
const presence = config.presences[Math.floor(Math.random() * config.presences.length)];
|
||||
let activity = presence.activity + config.append_presence;
|
||||
activity = activity.replace(/%s/g, config.prefix);
|
||||
client.user.setPresence({
|
||||
activity: {
|
||||
name: config.activities[num] + ` | ${config.prefix}help`,
|
||||
type: config.activity_types[num]
|
||||
name: activity,
|
||||
type: presence.type.toUpperCase()
|
||||
}
|
||||
}).catch(log.error);
|
||||
log.debug(`Updated presence: ${config.activity_types[num]} ${config.activities[num]}`);
|
||||
log.debug(`Updated presence: ${activity} ${presence.type}`);
|
||||
};
|
||||
|
||||
updatePresence();
|
||||
|
@ -6,8 +6,8 @@
|
||||
*
|
||||
*/
|
||||
|
||||
const ChildLogger = require('leekslazylogger').ChildLogger;
|
||||
const log = new ChildLogger();
|
||||
const Logger = require('leekslazylogger');
|
||||
const log = new Logger();
|
||||
|
||||
module.exports = {
|
||||
event: 'warn',
|
||||
|
@ -7,8 +7,8 @@
|
||||
*/
|
||||
|
||||
|
||||
const ChildLogger = require('leekslazylogger').ChildLogger;
|
||||
const log = new ChildLogger();
|
||||
const Logger = require('leekslazylogger');
|
||||
const log = new Logger();
|
||||
const lineReader = require('line-reader');
|
||||
const fs = require('fs');
|
||||
const dtf = require('@eartharoid/dtf');
|
||||
|
@ -6,8 +6,8 @@
|
||||
*
|
||||
*/
|
||||
|
||||
const ChildLogger = require('leekslazylogger').ChildLogger;
|
||||
const log = new ChildLogger();
|
||||
const Logger = require('leekslazylogger');
|
||||
const log = new Logger();
|
||||
const fetch = require('node-fetch');
|
||||
const config = require('../../user/' + require('../').config);
|
||||
let {version} = require('../../package.json');
|
||||
|
@ -29,8 +29,21 @@
|
||||
module.exports = {
|
||||
prefix: '-',
|
||||
name: 'DiscordTickets',
|
||||
activities: ['-new', 'with tickets', 'for new tickets'],
|
||||
activity_types: ['PLAYING', 'PLAYING', 'WATCHING'], // Available: PLAYING / LISTENING / WATCHING / STREAMING
|
||||
presences: [
|
||||
{
|
||||
activity: '%snew',
|
||||
type: 'PLAYING'
|
||||
},
|
||||
{
|
||||
activity: 'with tickets',
|
||||
type: 'PLAYING'
|
||||
},
|
||||
{
|
||||
activity: 'for new tickets',
|
||||
type: 'WATCHING'
|
||||
}
|
||||
],
|
||||
append_presence: ' | %shelp',
|
||||
colour: '#009999',
|
||||
err_colour: 'RED',
|
||||
cooldown: 3,
|
||||
|
Loading…
Reference in New Issue
Block a user