mirror of
https://gitlab.com/bignutty/labscore.git
synced 2025-06-08 06:03:04 -04:00
exports
This commit is contained in:
parent
e2146f5716
commit
6484c69851
4 changed files with 8 additions and 27 deletions
|
@ -19,7 +19,7 @@ const cluster = new ClusterClient("", {
|
|||
});
|
||||
|
||||
// Create this clusters paginator
|
||||
const paginator = new Paginator(cluster, {
|
||||
module.exports.paginator = new Paginator(cluster, {
|
||||
maxTime: 300000,
|
||||
pageLoop: true,
|
||||
pageNumber: true
|
||||
|
@ -46,8 +46,4 @@ if(process.env.PREFIX_OVERRIDE) commandPrefix = process.env.PREFIX_OVERRIDE;
|
|||
await interactionClient.addMultipleIn('../commands/interaction/');
|
||||
await interactionClient.run();
|
||||
|
||||
})();
|
||||
|
||||
module.exports = {
|
||||
paginator
|
||||
}
|
||||
})();
|
|
@ -22,12 +22,8 @@ const ALIASES = {
|
|||
"rs": "reset"
|
||||
}
|
||||
|
||||
function format(text, color){
|
||||
module.exports.format = function(text, color){
|
||||
if(!ANSI_COLORS[color] && !ALIASES[color]) throw "Invalid ANSI Color"
|
||||
if(!ANSI_COLORS[color]) color = ALIASES[color]
|
||||
return `${ANSI_COLORS[color]}${text}${ANSI_COLORS.reset}`
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
format
|
||||
}
|
|
@ -46,7 +46,7 @@ async function getRecentMedia(context, limit) {
|
|||
}
|
||||
|
||||
|
||||
async function getRecentVideo(context, limit) {
|
||||
module.exports.getRecentVideo = async function(context, limit) {
|
||||
if (!context.message.channel) {
|
||||
return undefined;
|
||||
}
|
||||
|
@ -81,7 +81,7 @@ async function getRecentVideo(context, limit) {
|
|||
return attachments;
|
||||
}
|
||||
|
||||
async function getRecentImage(context, limit) {
|
||||
module.exports.getRecentImage= async function(context, limit){
|
||||
let attachments = await getRecentMedia(context, limit)
|
||||
let at;
|
||||
let validImages = attachmentTypes.image
|
||||
|
@ -93,9 +93,4 @@ async function getRecentImage(context, limit) {
|
|||
}
|
||||
}
|
||||
return at;
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
getRecentImage,
|
||||
getRecentVideo
|
||||
}
|
|
@ -1,4 +1,4 @@
|
|||
async function getUser(context, query){
|
||||
module.exports.getUser = async function(context, query){
|
||||
let user;
|
||||
let member;
|
||||
if(/[0-9]{17,18}/.test(query)){
|
||||
|
@ -16,7 +16,7 @@ async function getUser(context, query){
|
|||
return {user: user, member: member};
|
||||
}
|
||||
|
||||
async function getMember(context, query){
|
||||
module.exports.getMember = async function(context, query){
|
||||
if(!context.guild) return;
|
||||
if(/[0-9]{17,18}/.test(query)){
|
||||
let uid = query.match(/[0-9]{17,18}/)
|
||||
|
@ -50,16 +50,10 @@ const BADGES = Object.freeze({
|
|||
[UserFlags.PREMIUM_EARLY_SUPPORTER]: '<:badge_earlysupporter:903277590956101672>'
|
||||
})
|
||||
|
||||
function renderBadges(user){
|
||||
module.exports.renderBadges = function(user){
|
||||
let badges = [];
|
||||
for(const flag of Object.keys(BADGES)){
|
||||
if(user.hasFlag(parseInt(flag))) badges.push(BADGES[flag])
|
||||
}
|
||||
return badges;
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
getUser,
|
||||
getMember,
|
||||
renderBadges
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue