mirror of
https://gitlab.com/bignutty/labscore.git
synced 2025-06-07 13:43:06 -04:00
minor not noteworthy improvements
This commit is contained in:
parent
eb7a03f971
commit
b209c257ec
3 changed files with 6 additions and 7 deletions
|
@ -1,14 +1,14 @@
|
|||
const { createEmbed } = require('../../../labscore/utils/embed')
|
||||
const { editOrReply } = require('../../../labscore/utils/message')
|
||||
|
||||
const { iconPill, smallIconPill, citation } = require('../../../labscore/utils/markdown')
|
||||
const { iconPill, smallIconPill } = require('../../../labscore/utils/markdown')
|
||||
|
||||
const { Permissions } = require("detritus-client/lib/constants");
|
||||
const { STATIC_ICONS } = require('../../../labscore/utils/statics');
|
||||
const { SparkWebSummarize } = require('../../../labscore/api/obelisk');
|
||||
const { hasFeature } = require('../../../labscore/utils/testing');
|
||||
|
||||
const URL_REGEX = /https?:\/\/(www\.)?[-a-zA-Z0-9@:%._\+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b([^> \n]*)/
|
||||
const URL_REGEX = /https?:\/\/(www\.)?[-a-zA-Z0-9@:%._+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b([^> \n]*)/
|
||||
|
||||
module.exports = {
|
||||
name: 'summarize',
|
||||
|
|
4
index.js
4
index.js
|
@ -8,7 +8,7 @@ const token = process.env.token;
|
|||
|
||||
// Get the correct path for each environment type
|
||||
let client = `./labscore/labscore/client.js`;
|
||||
if(process.env.environment == "local") client = `./labscore/client.js`
|
||||
if(process.env.environment === "local") client = `./labscore/client.js`
|
||||
if(["production","prod","prodnew"].includes(process.env.environment.toLowerCase())) client = `./labscore/labscore/client.js`;
|
||||
|
||||
const SHARDS = process.env.SHARDS || 2;
|
||||
|
@ -36,7 +36,7 @@ const manager = new ClusterManager(client, token, {
|
|||
await manager.run();
|
||||
console.log(`v2 | ready. took ${(Date.now() - time) / 1000}.`)
|
||||
|
||||
if(process.env.environment.toLowerCase() == "prod"){
|
||||
if(process.env.environment.toLowerCase() === "prod"){
|
||||
let liveDeploy = await superagent.get(`${process.env.PB_MANAGER_HOST}_pbs/v1/GetPbServiceId`)
|
||||
if(process.env.HOSTNAME !== liveDeploy.body.d){
|
||||
console.log(`[${process.env.HOSTNAME}] invalid deployment session`)
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
const { Permissions, InteractionCallbackTypes, MessageFlags } = require("detritus-client/lib/constants")
|
||||
const { Permissions } = require("detritus-client/lib/constants")
|
||||
const { basecamp } = require("../logging")
|
||||
const { STATICS } = require("./statics")
|
||||
const { createEmbed } = require("./embed")
|
||||
|
||||
module.exports.editOrReply = function(context, message, disableReference = false){
|
||||
|
@ -24,7 +23,7 @@ module.exports.editOrReply = function(context, message, disableReference = false
|
|||
This is the awesome solution to this problem, that isn't
|
||||
actually very awesome and actually sucks a lot.
|
||||
*/
|
||||
if(e.code == 200000){
|
||||
if(e.code === 200000){
|
||||
try{
|
||||
let embedResponse = createEmbed("error", context, "Response was filtered by AutoMod.")
|
||||
embedResponse.description = `Try running the command somewhere else or ask server admins for help.`
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue