feat(cmd): add 10grans ez-tip && fix(cmd): media attachment && style(cmd): default format: markdown
This commit is contained in:
parent
831179b337
commit
56ce1ccd5e
9 changed files with 44 additions and 11 deletions
7
main.js
7
main.js
|
@ -2,14 +2,13 @@ const sdk = require('matrix-js-sdk');
|
|||
const axios = require('axios');
|
||||
const registrar = require('./registrar.js');
|
||||
|
||||
const homeServer = 'https://civseed.com/_matrix/client/r0/login';
|
||||
const auth = {
|
||||
type: 'm.login.password',
|
||||
user: registrar.config.matrixUser,
|
||||
password: registrar.config.matrixPass,
|
||||
};
|
||||
|
||||
axios.post(homeServer, auth).then((response) => {
|
||||
axios.post(`${registrar.config.matrixServer}/_matrix/client/r0/login`, auth).then((response) => {
|
||||
CreateClient(response.data.access_token);
|
||||
}).catch((e) => {
|
||||
console.log(e);
|
||||
|
@ -88,6 +87,10 @@ let CreateClient = (token) => {
|
|||
registrar.reply.runQuery(matrixClient, room, address, flaggedInput, registrar);
|
||||
}
|
||||
|
||||
if (command === 'tip') {
|
||||
registrar.tip.runQuery(matrixClient, room, address, flaggedInput, registrar);
|
||||
}
|
||||
|
||||
if (command === 'unfren') {
|
||||
registrar.unfren.runQuery(matrixClient, room, userInput, registrar);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue