Skip to content

Commit

Permalink
fix gif plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
ender-null committed May 11, 2024
1 parent 26a7add commit 210ef9c
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/bot.ts
Original file line number Diff line number Diff line change
Expand Up @@ -523,7 +523,7 @@ export class Bot {
null,
new Conversation('alerts'),
this.user,
`${this.user.firstName} (@${this.user.username}) [<pre>${this.user.id}</pre>]\n<code class="language-${language}">${text}</code>`,
`${this.user.firstName} (@${this.user.username}) [<code>${this.user.id}</code>]\n<code class="language-${language}">${text}</code>`,
'text',
null,
null,
Expand All @@ -548,7 +548,7 @@ export class Bot {
null,
new Conversation('admin'),
this.user,
`${this.user.firstName} (@${this.user.username}) [${this.user.id}]\n${text}`,
`${this.user.firstName} (@${this.user.username}) [<code>${this.user.id}</code>]\n${text}`,
'text',
null,
null,
Expand Down
4 changes: 3 additions & 1 deletion src/plugins/gif.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,12 @@ export class GifPlugin extends PluginBase {
if (!input) {
return this.bot.replyMessage(msg, generateCommandHelp(this, msg.content));
}
const url = 'https://api.tenor.com/v1/search';
const url = 'https://tenor.googleapis.com/v2/search';
const params = {
q: input,
key: this.bot.config.apiKeys.tenor,
client_key: 'polaris',
limit: 1,
};
const resp = await sendRequest(url, params, null, null, false, this.bot);
const content = (await resp.json()) as any;
Expand Down
2 changes: 1 addition & 1 deletion src/plugins/urban-dictionary.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ export class UrbanDictionaryPlugin extends PluginBase {
}

const entry = content.list[0];
let text = `<b>${term}</b>\n\n${entry.definition}`;
let text = `<b>${term}</b>\n${entry.definition}`;
if (entry.example) {
text += `\n\n<blockquote>${entry.example}</blockquote>`;
}
Expand Down

0 comments on commit 210ef9c

Please sign in to comment.