File tree Expand file tree Collapse file tree 10 files changed +101
-93
lines changed
Expand file tree Collapse file tree 10 files changed +101
-93
lines changed Original file line number Diff line number Diff line change 1+ const { Command } = require ( '../utils' ) ;
2+
13const STRINGS = {
2- help : `
3- Mostra informações sobre o bot.
4+ help : Command . message `
5+ Mostra informações sobre o bot.
46
5- *uso:* \`\`\`!about [--args]\`\`\`
7+ *uso:* \`\`\`!about [--args]\`\`\`
68
7- *args válidos:*
9+ *args válidos:*
810 \`\`\`--help\`\`\` -> _mostra esta mensagem._
9- ` . trim ( ) ,
11+ ` ,
1012
11- about : `
12- Alice foi criada utilizando a biblioteca \`\`\`whatsapp-web.js\`\`\` como base sob licença Apache 2.0. Saiba mais em _https://github.com/pedroslopez/whatsapp-web.js_
13+ about : Command . message `
14+ Alice foi criada utilizando a biblioteca \`\`\`whatsapp-web.js\`\`\` como base sob licença Apache 2.0. Saiba mais em _https://github.com/pedroslopez/whatsapp-web.js_
1315
14- Não sabe como usar um comando? Use a flag help, ex: \`\`\`!lyric --help\`\`\`. Se não conhece os comandos, use \`\`\`!commands\`\`\`
16+ Não sabe como usar um comando? Use a flag help, ex: \`\`\`!lyric --help\`\`\`. Se não conhece os comandos, use \`\`\`!commands\`\`\`
1517
16- _Quer contribuir? Então dá uma olhada em https://github.com/Coding-in-community/alice_
17- ` . trim ( ) ,
18+ _Quer contribuir? Então dá uma olhada em https://github.com/Coding-in-community/alice_
19+ ` ,
1820} ;
1921
2022class About {
Original file line number Diff line number Diff line change 11const axios = require ( 'axios' ) ;
22const cheerio = require ( 'cheerio' ) ;
3+ const { Command } = require ( '../utils' ) ;
34
45const STRINGS = {
5- help : `
6- Retorna dados de uma moeda disponível no CoinMarketCap (https://coinmarketcap.com).
6+ help : Command . message `
7+ Retorna dados de uma moeda disponível no CoinMarketCap (https://coinmarketcap.com).
78
8- *uso:* \`\`\`!coin [--args] coin_name\`\`\`
9+ *uso:* \`\`\`!coin [--args] coin_name\`\`\`
910
10- *args válidos:*
11+ *args válidos:*
1112 \`\`\`--all\`\`\` -> _retorna todos os dados disponíveis._
1213 \`\`\`--help\`\`\` -> _mostra essa mensagem._
13- ` . trim ( ) ,
14+ ` ,
1415} ;
1516
1617async function loadCheerio ( url ) {
Original file line number Diff line number Diff line change 1+ const { Command } = require ( '../utils' ) ;
2+
13const STRINGS = {
2- help : `
3- Lista todos os comandos disponíveis.
4+ help : Command . message `
5+ Lista todos os comandos disponíveis.
46
5- *uso:* \`\`\`!commands [--args]\`\`\`
7+ *uso:* \`\`\`!commands [--args]\`\`\`
68
7- *args válidos:*
9+ *args válidos:*
810 \`\`\`--help\`\`\` -> _mostra esta mensagem._
9- ` . trim ( ) ,
10-
11- availableCommands : `
12- Os seguintes comandos estão disponiveis:
13- - !about
14- - !coin
15- - !commands
16- - !cron
17- - !links
18- - !lyric
19- - !report
20- - !search
21- - !suggest
22- - !wiki
23- ` . trim ( ) ,
11+ ` ,
12+
13+ availableCommands : Command . message `
14+ Os seguintes comandos estão disponiveis:
15+ - !about
16+ - !coin
17+ - !commands
18+ - !cron
19+ - !links
20+ - !lyric
21+ - !report
22+ - !search
23+ - !suggest
24+ - !wiki
25+ ` ,
2426} ;
2527
2628class Commands {
Original file line number Diff line number Diff line change 11const events = require ( 'events' ) ;
2- const { chattools, Time } = require ( '../utils' ) ;
2+ const { chattools, Time, Command } = require ( '../utils' ) ;
33
44const STRINGS = {
5- help : `
6- Repete uma mensagem em um determinado período de tempo. Cada mensagem é representada por uma thread.
5+ help : Command . message `
6+ Repete uma mensagem em um determinado período de tempo. Cada mensagem é representada por uma thread.
77
8- *uso:* \`\`\`!cron --args [--kwargs=<type>] ...\`\`\`
8+ *uso:* \`\`\`!cron --args [--kwargs=<type>] ...\`\`\`
99
10- *args válidos:*
10+ *args válidos:*
1111 \`\`\`--create\`\`\` -> _cria uma nova thread._
1212 \`\`\`--destroy\`\`\` -> _para e apaga uma thread._
1313 \`\`\`--stop\`\`\` -> _para uma thread._
@@ -16,12 +16,12 @@ Repete uma mensagem em um determinado período de tempo. Cada mensagem é repres
1616 \`\`\`--killall\`\`\` -> _para e apaga todas as threads._
1717 \`\`\`--help\`\`\` -> _mostra esta mensagem._
1818
19- *kwargs válidos:*
19+ *kwargs válidos:*
2020 \`\`\`--s=<int>\`\`\` -> _define um periodo em segundos._
2121 \`\`\`--m=<int>\`\`\` -> _define um periodo em minutos._
2222 \`\`\`--h=<int>\`\`\` -> _define um periodo em horas._
2323 \`\`\`--d=<int>\`\`\` -> _define um periodo em dias._
24- ` . trim ( ) ,
24+ ` ,
2525} ;
2626const emitter = new events . EventEmitter ( ) ;
2727
Original file line number Diff line number Diff line change 1+ const { Command } = require ( '../utils' ) ;
2+
13const STRINGS = {
2- help : `
3- Lista links para os grupos coding.
4+ help : Command . message `
5+ Lista links para os grupos coding.
46
5- *uso:* \`\`\`!links [--args]\`\`\`
7+ *uso:* \`\`\`!links [--args]\`\`\`
68
7- *args válidos:*
9+ *args válidos:*
810 \`\`\`--help\`\`\` -> _mostra esta mensagem._
9- ` . trim ( ) ,
11+ ` ,
1012
11- groupsLinks : `
12- Coding in python:
13- https://chat.whatsapp.com/I4IpHC0YFPQLUcGHJeqYdF
13+ groupsLinks : Command . message `
14+ Coding in python:
15+ https://chat.whatsapp.com/I4IpHC0YFPQLUcGHJeqYdF
1416
15- Coding in C/C++:
16- https://chat.whatsapp.com/Csn56Bpj8hVIQ3FiZoxBKh
17+ Coding in C/C++:
18+ https://chat.whatsapp.com/Csn56Bpj8hVIQ3FiZoxBKh
1719
18- Coding in Javascript:
19- https://chat.whatsapp.com/IUXcqbAPdJC2IuNfd7aaF5
20+ Coding in Javascript:
21+ https://chat.whatsapp.com/IUXcqbAPdJC2IuNfd7aaF5
2022
21- Coding in PHP:
22- https://chat.whatsapp.com/C6wcXZhyT869Q29PIL1J20
23+ Coding in PHP:
24+ https://chat.whatsapp.com/C6wcXZhyT869Q29PIL1J20
2325
24- Coding in Java:
25- https://chat.whatsapp.com/KDjc7IoCAYWAjCAwNEJ5cF
26+ Coding in Java:
27+ https://chat.whatsapp.com/KDjc7IoCAYWAjCAwNEJ5cF
2628
27- Coding on Linux:
28- https://chat.whatsapp.com/D37sPPhUsiT5LZ8PQeqg4t
29+ Coding on Linux:
30+ https://chat.whatsapp.com/D37sPPhUsiT5LZ8PQeqg4t
2931
30- Coding in Taberna:
31- https://chat.whatsapp.com/GOXnIXSXEFH7wHvO9aTuFs
32+ Coding in Taberna:
33+ https://chat.whatsapp.com/GOXnIXSXEFH7wHvO9aTuFs
3234
33- Speaking in English:
34- https://chat.whatsapp.com/EOirNapuFe3CVunBqbwj1Z
35- ` . trim ( ) ,
35+ Speaking in English:
36+ https://chat.whatsapp.com/EOirNapuFe3CVunBqbwj1Z
37+ ` ,
3638} ;
3739
3840class Links {
Original file line number Diff line number Diff line change 11const axios = require ( 'axios' ) ;
22const JSSoup = require ( 'jssoup' ) . default ;
3- const { search } = require ( '../utils' ) ;
3+ const { search, Command } = require ( '../utils' ) ;
44
55const STRINGS = {
6- help : `
7- Retorna a letra de uma música.
6+ help : Command . message `
7+ Retorna a letra de uma música.
88
9- *uso:* \`\`\`!lyric [--args] music_name\`\`\`
9+ *uso:* \`\`\`!lyric [--args] music_name\`\`\`
1010
11- *args válidos:*
11+ *args válidos:*
1212 \`\`\`--help\`\`\` -> _mostra esta mensagem._
13- ` . trim ( ) ,
13+ ` ,
1414} ;
1515
1616async function makeSoup ( url ) {
Original file line number Diff line number Diff line change 1- const { chattools } = require ( '../utils' ) ;
1+ const { chattools, Command } = require ( '../utils' ) ;
22
33const STRINGS = {
4- help : `
5- Reporte problemas no bot ou um usuário.
4+ help : Command . message `
5+ Reporte problemas no bot ou um usuário.
66
7- *uso:* \`\`\`!report --args ...\`\`\`
7+ *uso:* \`\`\`!report --args ...\`\`\`
88
9- *args válidos:*
9+ *args válidos:*
1010 \`\`\`--bug\`\`\` -> _reporta um bug._
1111 \`\`\`--user\`\`\` -> reporta um usuário._
1212 \`\`\`--help\`\`\` -> _mostra esta mensagem._
13- ` . trim ( ) ,
13+ ` ,
1414 bug : 'sua solicitação será analisada. caso confirmada, abriremos uma issue' ,
1515 user : 'o usuário foi reportado a administração' ,
1616} ;
Original file line number Diff line number Diff line change 1- const { search } = require ( '../utils' ) ;
1+ const { search, Command } = require ( '../utils' ) ;
22
33const STRINGS = {
4- help : `
5- Retorna o primeiro resultado de uma pesquisa no google.
4+ help : Command . message `
5+ Retorna o primeiro resultado de uma pesquisa no google.
66
7- *uso:* \`\`\`!cron [--args] ...\`\`\`
7+ *uso:* \`\`\`!cron [--args] ...\`\`\`
88
9- *args válidos:*
9+ *args válidos:*
1010 \`\`\`--help\`\`\` -> _mostra esta mensagem._
1111 \`\`\`--target\`\`\` -> _define um site especifico para pesquisa._
1212 \`\`\`--limit\`\`\` -> _define um limite de resultados. O padrão é 1._
13- ` . trim ( ) ,
13+ ` ,
1414} ;
1515
1616class Search {
Original file line number Diff line number Diff line change 1- const { chattools } = require ( '../utils' ) ;
1+ const { chattools, Command } = require ( '../utils' ) ;
22
33const STRINGS = {
4- help : `
5- Sugira algo com este comando.
4+ help : Command . message `
5+ Sugira algo com este comando.
66
7- *uso:* \`\`\`!suggest --args ...\`\`\`
7+ *uso:* \`\`\`!suggest --args ...\`\`\`
88
9- *args válidos:*
9+ *args válidos:*
1010 \`\`\`--feature\`\`\` -> _sugira algo novo._
1111 \`\`\`--remove\`\`\` -> _sugira remoções._
1212 \`\`\`--change\`\`\` -> _sugira mudanças._
1313 \`\`\`--help\`\`\` -> _mostra esta mensagem._
14- ` . trim ( ) ,
14+ ` ,
1515} ;
1616
1717class Suggest {
Original file line number Diff line number Diff line change 11const wikijs = require ( 'wikijs' ) . default ;
2+ const { Command } = require ( '../utils' ) ;
23
34const STRINGS = {
4- help : `
5- Faz uma pesquisa na wikipedia.
5+ help : Command . message `
6+ Faz uma pesquisa na wikipedia.
67
7- *uso:* \`\`\`!wiki [--args] ...\`\`\`
8+ *uso:* \`\`\`!wiki [--args] ...\`\`\`
89
9- *args válidos:*
10+ *args válidos:*
1011 \`\`\`--search\`\`\` -> _retorna uma lista com os títulos dos artigos encontrados._
1112 \`\`\`--help\`\`\` -> _mostra esta mensagem._
12- ` . trim ( ) ,
13+ ` ,
1314} ;
1415
1516class Wiki {
You can’t perform that action at this time.
0 commit comments