Skip to content
This repository has been archived by the owner on Jul 11, 2024. It is now read-only.

Commit

Permalink
🐛 (embed-bug) temporary fix for #29
Browse files Browse the repository at this point in the history
  • Loading branch information
MeerBiene committed Apr 10, 2021
1 parent 4cdaba4 commit 001772c
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion TODOBOT/interactions/list.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ const Pagination = require('discord-paginationembed');

const raw = {
name: 'list',
description: 'List todos for your server.'
description: 'List todos for your server. Use the 🔄 emoji to repot the currently open todo. Use the arrow emojis to navigate.'
};

module.exports = {
Expand Down
1 change: 1 addition & 0 deletions TODOBOT/interactions/settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,7 @@ module.exports = {
readonlychannel: conf.readonlychannel,
userroles: conf.userroles,
staffroles: conf.staffroles,
autopurge: conf.autopurge,
language: conf.lang
};

Expand Down
5 changes: 4 additions & 1 deletion TODOBOT/interactions/tag.js
Original file line number Diff line number Diff line change
Expand Up @@ -104,10 +104,13 @@ module.exports = {
switch (action) {
case 'list':
//FIXME this is probably still erroring, needs some big brain time to find a fix
// temporary fix: just slice the output if it gets too long
let output = '';
Object.keys(conf.tags).forEach(key => {
output += `• \`${key}\` => ${conf.tags[key].slice(0, 69)} \n`;
output += `• \`${key}\` => ${ conf.tags[key].length > 69 ? conf.tags[key].slice(0, 69) : conf.tags[key] } \n`;
if (output.length > 2000) return;
})
if (output.length > 2000) output.slice(0, 2000) + '...'
interaction.embed.default(`**` + messages.availabletags[lang] + `**` + `\n\n${output}`);
break;
case 'learn':
Expand Down

0 comments on commit 001772c

Please sign in to comment.