add initial complete webui, more ai commands for moderation, add api
This commit is contained in:
parent
19e794e34c
commit
173d4e7a52
112 changed files with 8176 additions and 780 deletions
|
@ -1,32 +0,0 @@
|
|||
/*
|
||||
import Resources from '../props/resources.json';
|
||||
import { getStrings } from '../plugins/checklang';
|
||||
import { isOnSpamWatch } from '../spamwatch/spamwatch';
|
||||
import spamwatchMiddlewareModule from '../spamwatch/Middleware';
|
||||
import escape from 'markdown-escape';
|
||||
import axios from 'axios';
|
||||
|
||||
const spamwatchMiddleware = spamwatchMiddlewareModule(isOnSpamWatch);
|
||||
|
||||
export default (bot) => {
|
||||
bot.command("quote", spamwatchMiddleware, async (ctx) => {
|
||||
const Strings = getStrings(ctx.from.language_code);
|
||||
|
||||
try {
|
||||
const response = await axios.get(Resources.quoteApi);
|
||||
const data = response.data;
|
||||
|
||||
ctx.reply(escape(`${escape(Strings.quoteResult)}\n> *${escape(data.quote)}*\n_${escape(data.author)}_`), {
|
||||
reply_to_message_id: ctx.message.message_id,
|
||||
parse_mode: 'Markdown'
|
||||
});
|
||||
} catch (error) {
|
||||
console.error(error);
|
||||
ctx.reply(Strings.quoteErr, {
|
||||
reply_to_message_id: ctx.message.id,
|
||||
parse_mode: 'MarkdownV2'
|
||||
});
|
||||
};
|
||||
});
|
||||
};
|
||||
*/
|
Loading…
Add table
Add a link
Reference in a new issue