Skip to content

Commit

Permalink
feat(latex): use MathJax for LaTeX image generation
Browse files Browse the repository at this point in the history
Interprétation LaTeX par le bot lui-même (#97)

Co-authored-by: Elliot <[email protected]>
  • Loading branch information
Niilyx and noftaly authored Nov 10, 2023
1 parent bcda527 commit 4ff11cc
Show file tree
Hide file tree
Showing 5 changed files with 522 additions and 15 deletions.
2 changes: 2 additions & 0 deletions config/commands/general.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,8 @@ export const latex = {
placeholder: 'Écris ton équation ici... e.g. \\frac{1}{2}',
},
},
invalidEquation: "Cette équation n'est pas valide ! Le message d'erreur LaTeX est :\n`{msg}`",
genericError: "L'image de la formule n'a pas pu être générée.",
},
} as const;

Expand Down
2 changes: 1 addition & 1 deletion config/settings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ export const settings = {
discordInviteLinkRegex: /(?:discord\.(?:gg|io|me|plus|link)|invite\.(?:gg|ink)|discord(?:app)?\.com\/invite)\/(?<code>[\w-]{2,})/i,
},
apis: {
latex: 'https://chart.apis.google.com/chart?cht=tx&chf=bg,s,FFFFFF00&chco=FFFFFF&chl=',
compiler: 'https://api.jdoodle.com/v1/execute',
compilerCredits: 'https://api.jdoodle.com/v1/credit-spent',
},
Expand Down Expand Up @@ -93,5 +92,6 @@ export const settings = {
thanks: [
`Kétessar Tan (${userMention('222050512684580876')}) : contributions`,
`David Gorgette (${userMention('890084641317478400')}) : suggestions & signalements de bugs`,
`Idir Nait Meddour (${userMention('280682698740203521')}) : contributions`,
],
} as const;
Loading

0 comments on commit 4ff11cc

Please sign in to comment.