clean bb_scripts
This commit is contained in:
parent
cbfa5c4e4b
commit
c36c294780
|
@ -2,7 +2,7 @@ const bot = require('bbot');
|
||||||
const exec = require('child_process').exec;
|
const exec = require('child_process').exec;
|
||||||
|
|
||||||
bot.global.text({
|
bot.global.text({
|
||||||
starts: ['pubkey','publique','rib','public','cle', 'brocket rib']
|
contains: ['pubkey','publique','rib','public','cle', 'brocket rib']
|
||||||
}, (b) => {
|
}, (b) => {
|
||||||
username = b.message.user.name
|
username = b.message.user.name
|
||||||
cmd = b.message.text
|
cmd = b.message.text
|
||||||
|
|
|
@ -4,9 +4,10 @@ const fs = require('fs');
|
||||||
const util = require('util')
|
const util = require('util')
|
||||||
|
|
||||||
bot.global.text({
|
bot.global.text({
|
||||||
contains: ['biz aide','biz help']
|
contains: ['TEST BSMS']
|
||||||
}, (b) => {
|
}, (b) => {
|
||||||
membres = exec("src/shell/aide.sh text", function(err, stdout, stderr) {
|
b.respond("Test de G1SMS ...")
|
||||||
|
membres = exec("g1sms/test.sh chat", function(err, stdout, stderr) {
|
||||||
if (err) {
|
if (err) {
|
||||||
b.respond("Une erreur est survenu ...")
|
b.respond("Une erreur est survenu ...")
|
||||||
} else {
|
} else {
|
||||||
|
@ -14,6 +15,6 @@ bot.global.text({
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}, {
|
}, {
|
||||||
id: 'biz-aide'
|
id: 'sms-test'
|
||||||
});
|
});
|
||||||
|
|
|
@ -8,6 +8,4 @@
|
||||||
- pubkey [pseudo]: Affiche sa propre clé publique Ğ1 si [pseudo] n'est pas renseigné, ou bien celle du pseudo indiqué
|
- pubkey [pseudo]: Affiche sa propre clé publique Ğ1 si [pseudo] n'est pas renseigné, ou bien celle du pseudo indiqué
|
||||||
- axiom adhérents: Affiche les adhérents de l'association
|
- axiom adhérents: Affiche les adhérents de l'association
|
||||||
- axiom cagnotte: Affiche le status de la cagnotte de l'association
|
- axiom cagnotte: Affiche le status de la cagnotte de l'association
|
||||||
- Massages Viet pour 150Ğ1
|
|
||||||
- Et bien d'autres choses, je vais pas tout te dire non plus !! 🤣
|
|
||||||
```
|
```
|
||||||
|
|
|
@ -5,7 +5,7 @@ bot.global.text({
|
||||||
is: ['biz reload']
|
is: ['biz reload']
|
||||||
}, (b) => {
|
}, (b) => {
|
||||||
function reload() {
|
function reload() {
|
||||||
pubkey = exec("pm2 reload index --force", function(err, stdout, stderr) {
|
pubkey = exec("pm2 reload bbot --force", function(err, stdout, stderr) {
|
||||||
if (err) {
|
if (err) {
|
||||||
b.respond("Une erreur est survenu: " + " - " + stderr)
|
b.respond("Une erreur est survenu: " + " - " + stderr)
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -1,51 +0,0 @@
|
||||||
const bot = require('bbot');
|
|
||||||
const exec = require('child_process').exec;
|
|
||||||
|
|
||||||
//ADMINS
|
|
||||||
var adminRooms = ["pokabizbot", "_recrutement", "compta-axiom", "_admin-at", "test-bot-chat", "poka"];
|
|
||||||
//var adminRooms = exec("cat admins-chan.txt");
|
|
||||||
|
|
||||||
bot.global.text({
|
|
||||||
contains: ['axiom adhérent','axiom adhérents','axiom adherent','axiom adherents']
|
|
||||||
}, (b) => {
|
|
||||||
// cmd = b.message.text
|
|
||||||
// roomName = b.message.user.room.name
|
|
||||||
|
|
||||||
if (b.message.user.room.type == "p") {
|
|
||||||
roomName = b.message.user.room.name
|
|
||||||
} else {
|
|
||||||
roomName = b.message.user.name
|
|
||||||
}
|
|
||||||
|
|
||||||
if (adminRooms.indexOf(roomName) == -1) {
|
|
||||||
cmd = "adherentsSoft"
|
|
||||||
} else {
|
|
||||||
cmd = "adherents"
|
|
||||||
}
|
|
||||||
process.env.hb_cmd = cmd
|
|
||||||
|
|
||||||
pubkey = exec("src/shell/helloasso.sh $hb_cmd", function(err, stdout, stderr) {
|
|
||||||
if (err) {
|
|
||||||
b.respond("Une erreur est survenu ...")
|
|
||||||
} else {
|
|
||||||
b.respond(stdout)
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}, {
|
|
||||||
id: 'axiom-adherents'
|
|
||||||
});
|
|
||||||
|
|
||||||
bot.global.text({
|
|
||||||
contains: ['axiom cagnotte']
|
|
||||||
}, (b) => {
|
|
||||||
membres = exec("src/shell/helloasso.sh cagnotte", function(err, stdout, stderr) {
|
|
||||||
if (err) {
|
|
||||||
b.respond("Une erreur est survenu ...")
|
|
||||||
} else {
|
|
||||||
b.respond(stdout)
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}, {
|
|
||||||
id: 'axiom-cagnotte'
|
|
||||||
});
|
|
||||||
|
|
|
@ -1,17 +0,0 @@
|
||||||
const bot = require('bbot');
|
|
||||||
const exec = require('child_process').exec;
|
|
||||||
const util = require('util');
|
|
||||||
|
|
||||||
bot.global.text({
|
|
||||||
contains: ['debug user']
|
|
||||||
}, (b) => {
|
|
||||||
username = b.message
|
|
||||||
// const userId = res.message.user.id
|
|
||||||
// username = robot.adapter.api.get('users.info', { userId })
|
|
||||||
// process.env.hb_username = username
|
|
||||||
b.reply("```" + util.inspect(username, {showHidden: false, depth: null}) + "```")
|
|
||||||
|
|
||||||
|
|
||||||
}, {
|
|
||||||
id: 'debug'
|
|
||||||
});
|
|
|
@ -1,201 +0,0 @@
|
||||||
const bot = require('bbot')
|
|
||||||
|
|
||||||
/**
|
|
||||||
* All branch examples start from the "global" conversation scope.
|
|
||||||
* We are working on features to provide branching within a conversational
|
|
||||||
* context, but as those methods are changing in the beta, they aren't included
|
|
||||||
* as examples to follow just yet.
|
|
||||||
*/
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Branch types are declared from their scope, see all available types here:
|
|
||||||
* http://bbot.chat/docs/path#builtforbranching
|
|
||||||
*
|
|
||||||
* `text` branches take the following arguments:
|
|
||||||
* - matcher: expression, semantic conditions object, or array of conditions
|
|
||||||
* - callback: to fire on successful match, given the state object (b)
|
|
||||||
* - [options]: object with `id` (string) and/or `force` (boolean) attributes
|
|
||||||
*
|
|
||||||
* Test with "Hello bots!"
|
|
||||||
*/
|
|
||||||
bot.global.text(/(hi|hello).*bots?/, (b) => b.respond('Hello :wave:'), {
|
|
||||||
id: 'hello-bots'
|
|
||||||
})
|
|
||||||
|
|
||||||
/**
|
|
||||||
* `direct` branch type requires the bot to be explicitly addressed.
|
|
||||||
*
|
|
||||||
* `reply` instead of `respond` prepends messages with user's name.
|
|
||||||
*
|
|
||||||
* In Rocket.Chat all messages to a bot in a direct room have the name prepended
|
|
||||||
* by the Rocket.Chat SDK before it's processed by the bot framework.
|
|
||||||
*
|
|
||||||
* Test with "@brocket Hello" or just "Hello" in a DM.
|
|
||||||
*/
|
|
||||||
bot.global.direct(/hi|hello/i, (b) => b.reply('Hey there.'), {
|
|
||||||
id: 'hello-direct'
|
|
||||||
})
|
|
||||||
|
|
||||||
/**
|
|
||||||
* `respondVia` allows using custom platform methods to dispatch response.
|
|
||||||
*
|
|
||||||
* Matcher conditions allow semantic attributes with a string or array of
|
|
||||||
* optional values to match against, possibly capturing content.
|
|
||||||
* Accepted atts: is, starts, ends, contains, excludes, after, before, range
|
|
||||||
*
|
|
||||||
* Test with "Hello anyone?"
|
|
||||||
*/
|
|
||||||
bot.global.text({
|
|
||||||
contains: ['hi', 'hello']
|
|
||||||
}, (b) => b.respondVia('react', ':wave:'), {
|
|
||||||
id: 'hello-react'
|
|
||||||
})
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Branch callbacks allow asynchronous responding, if they return a promise.
|
|
||||||
* State (b) includes branch matching attributes, see bbot.chat/docs/thought.
|
|
||||||
*
|
|
||||||
* Test with "@brocket ping back in 5 seconds"
|
|
||||||
*/
|
|
||||||
bot.global.direct(/ping back in (\d*)/i, async (b) => {
|
|
||||||
const ms = parseInt(b.match[1]) * 1000
|
|
||||||
await new Promise((resolve) => setTimeout(resolve, ms))
|
|
||||||
return b.respond('Ping :ping_pong:')
|
|
||||||
}, {
|
|
||||||
id: 'ping-delay'
|
|
||||||
})
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The `respond` method can accept attachment objects as well as strings.
|
|
||||||
* Rendering support depends on the message platform and adapter. In shell,
|
|
||||||
* it will display the fallback text.
|
|
||||||
*
|
|
||||||
* Test with "bot attach image"
|
|
||||||
*/
|
|
||||||
bot.global.text(/attach image/i, (b) => {
|
|
||||||
return b.respond({
|
|
||||||
fallback: `See: https://www.wikiwand.com/en/Three_Laws_of_Robotics`,
|
|
||||||
image: `https://upload.wikimedia.org/wikipedia/en/8/8e/I_Robot_-_Runaround.jpg`,
|
|
||||||
title: {
|
|
||||||
text: `Asimov's Three Laws of Robotics`,
|
|
||||||
link: `https://www.wikiwand.com/en/Three_Laws_of_Robotics`
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}, { id: 'attach-image' })
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The `envelope` provides helpers for adding rich-message payloads before
|
|
||||||
* responding. Preparing envelopes before dispatch also allows changing the
|
|
||||||
* user/room the envelope is addressed to or dispatching multiple envelopes.
|
|
||||||
*
|
|
||||||
* Test with "I want a prize"
|
|
||||||
*/
|
|
||||||
bot.global.text({
|
|
||||||
contains: 'prize'
|
|
||||||
}, (b) => {
|
|
||||||
b.envelope.write('Choose your fate! 🚪... 🎁 ')
|
|
||||||
b.envelope.attach({ color: '#f4426e' })
|
|
||||||
b.envelope.payload
|
|
||||||
.quickReply({ text: 'Door number 1' })
|
|
||||||
.quickReply({ text: 'Door number 2' })
|
|
||||||
.quickReply({ text: 'Door number 3' })
|
|
||||||
return b.respond().catch((err) => console.error(err))
|
|
||||||
}, { id: 'door-prize-intro' })
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The `conditions` attribute contains results of semantic condition matching
|
|
||||||
* and capture groups. Each condition can be given a key for easy reference.
|
|
||||||
*
|
|
||||||
* Test with "what's behind door number 2"
|
|
||||||
*/
|
|
||||||
bot.global.text({
|
|
||||||
door: { after: 'door', range: '1-3' }
|
|
||||||
}, (b) => {
|
|
||||||
switch (b.conditions.captured.door) {
|
|
||||||
case '1': return b.respond(`You win nothing 💔`)
|
|
||||||
case '2': return b.respond(`You win a monkey 🐒`)
|
|
||||||
case '3': return b.respond(`It's a new car!! 🚗`)
|
|
||||||
}
|
|
||||||
}, { id: 'door-prize-award' })
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Branch callbacks can be async functions, to awaiting one or more processes
|
|
||||||
* before responding. This example uses API requests to fill a dynamic array
|
|
||||||
* of actions, using the url property to provide link action buttons.
|
|
||||||
*
|
|
||||||
* Test with "@brocket plan meeting" in a public or private room.
|
|
||||||
*/
|
|
||||||
bot.global.direct({
|
|
||||||
is: 'plan meeting'
|
|
||||||
}, async (b) => {
|
|
||||||
if (bot.adapters.message.name !== 'rocketchat-message-adapter') return
|
|
||||||
b.envelope.write('Please review time zones in the room...')
|
|
||||||
const { id, type } = b.message.user.room
|
|
||||||
let room
|
|
||||||
const q = { roomId: id }
|
|
||||||
if (type === 'c') {
|
|
||||||
room = await bot.adapters.message.api.get('channels.members', q, true)
|
|
||||||
} else if (type === 'p') {
|
|
||||||
room = await bot.adapters.message.api.get('groups.members', q, true)
|
|
||||||
} else {
|
|
||||||
return b.respond('Sorry, that only works in channels and private groups.')
|
|
||||||
}
|
|
||||||
const offsets = room.members
|
|
||||||
.map((member) => member.utcOffset || undefined)
|
|
||||||
.filter((offset) => !!offset)
|
|
||||||
for (let utc of offsets) {
|
|
||||||
b.envelope.payload.quickReply({
|
|
||||||
text: `🌐 UTC ${utc}`,
|
|
||||||
url: `https://www.timeanddate.com/worldclock/timezone/utc${utc}`
|
|
||||||
})
|
|
||||||
}
|
|
||||||
b.respond()
|
|
||||||
})
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @todo This example requires PR #11811 to be merged. Room names are undefined.
|
|
||||||
*/
|
|
||||||
bot.global.text(/where am i/i, (b) => {
|
|
||||||
const { name, type } = b.message.user.room
|
|
||||||
switch (type) {
|
|
||||||
case 'c': return b.respond(`You're in the #${name} public channel.`)
|
|
||||||
case 'p': return b.respond(`You're in a private group called **${name}**.`)
|
|
||||||
case 'l': return b.respond(`You're in a livechat channel.`)
|
|
||||||
case 'd': return b.respond(`You're in a DM with me :hugging:`)
|
|
||||||
}
|
|
||||||
}, {
|
|
||||||
id: 'location-check'
|
|
||||||
})
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Custom options can be added to the bot, with the full config utility of bBot,
|
|
||||||
* allowing them to be defined as environment variables, command line args or
|
|
||||||
* package.json attributes. Extend settings with a yargs option format.
|
|
||||||
*
|
|
||||||
* Try any of the following:
|
|
||||||
* - `node index.js --avatar <YOUR_AVATAR_URL>`
|
|
||||||
* - BOT_AVATAR=<YOUR_AVATAR_URL> in .env
|
|
||||||
* - `{ "bot": { "avatar": "<YOUR_AVATAR_URL>" } }` in package.json
|
|
||||||
*/
|
|
||||||
bot.settings.extend({
|
|
||||||
avatar: {
|
|
||||||
'type': 'string',
|
|
||||||
'description': 'Set a custom avatar for your bot account profile'
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The bot can access lower level methods of the Rocket.Chat SDK through the
|
|
||||||
* message adapter, once it's connected. This example sets an avatar on login.
|
|
||||||
*
|
|
||||||
* Try replacing the avatar configured in package.json with your own.
|
|
||||||
*/
|
|
||||||
bot.events.on('started', () => {
|
|
||||||
if (bot.adapters.message.name !== 'rocketchat-message-adapter') return
|
|
||||||
if (bot.settings.get('avatar')) {
|
|
||||||
bot.logger.info('Setting bot avatar')
|
|
||||||
bot.adapters.message.api.post('users.setAvatar', {
|
|
||||||
avatarUrl: bot.settings.get('avatar')
|
|
||||||
})
|
|
||||||
}
|
|
||||||
})
|
|
|
@ -1,33 +0,0 @@
|
||||||
const bot = require('bbot');
|
|
||||||
const exec = require('child_process').exec;
|
|
||||||
const fs = require('fs');
|
|
||||||
const util = require('util')
|
|
||||||
|
|
||||||
bot.global.text({ contains: [''] }, (b) => b.respond(""), {
|
|
||||||
id: 'id-tpl'
|
|
||||||
})
|
|
||||||
|
|
||||||
// --------
|
|
||||||
|
|
||||||
bot.global.text({ contains: [''] }, (b) => {
|
|
||||||
b.respond("")
|
|
||||||
}, {
|
|
||||||
id: 'id-tpl-2'
|
|
||||||
});
|
|
||||||
|
|
||||||
// --------
|
|
||||||
|
|
||||||
bot.global.text({
|
|
||||||
contains: ['']
|
|
||||||
}, (b) => {
|
|
||||||
membres = exec("src/shell/.sh", function(err, stdout, stderr) {
|
|
||||||
if (err) {
|
|
||||||
b.respond("Une erreur est survenu ...")
|
|
||||||
} else {
|
|
||||||
b.respond(stdout)
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}, {
|
|
||||||
id: 'id-tpl-3'
|
|
||||||
});
|
|
||||||
|
|
|
@ -1,57 +0,0 @@
|
||||||
|
|
||||||
const bot = require('bbot');
|
|
||||||
const request = require('request');
|
|
||||||
const decodeEntities = require('decode-entities');
|
|
||||||
//var decode = require('unescape');
|
|
||||||
|
|
||||||
var request_options = {
|
|
||||||
headers: {
|
|
||||||
'User-Agent': 'crabot retrieving url metadata (https://wiki.crapaud-fou.org/crabot)'
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
bot.global.text(/(https?:\/\/[^ ,\)"\n]*)/ig, async (b) => {
|
|
||||||
// console.log(JSON.stringify(b.match, null, 2));
|
|
||||||
for (url of b.match) {
|
|
||||||
// console.log(JSON.stringify(url, null, 2));
|
|
||||||
if (!/(coa|pad)\.crapaud-fou\.org/.test(url)) {
|
|
||||||
request_options.url = url;
|
|
||||||
request(request_options, (err, res, body) => {
|
|
||||||
// console.log(JSON.stringify(res, null, 2));
|
|
||||||
if (!err && res.statusCode === 200) {
|
|
||||||
var re = /<title[^>]*>([^<]*)<\/title>/gi;
|
|
||||||
var match = re.exec(body);
|
|
||||||
if (match && match[1]) {
|
|
||||||
var extra = "";
|
|
||||||
var link = res.request.uri.href;
|
|
||||||
link = link.replace(/[\?&]fbclid=.+/gi, "");
|
|
||||||
link = link.replace(/[\?&]ncid=.+/gi, "");
|
|
||||||
//kopa match[1] = match[1].replace("'", "'");
|
|
||||||
if (/youtube.com/.test(link)) {
|
|
||||||
if (t = /[?&]v=([^&]+)/.exec(link)) {
|
|
||||||
link = "https://www.youtube.com/watch?v=" + t[1];
|
|
||||||
extra += " - [no-cookie](https://www.youtube-nocookie.com/embed/" + t[1] + ")";
|
|
||||||
extra += " - [invidious](https://invidio.us/watch?v=" + t[1] + ")";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
b.respond(decodeEntities("[>>>](" + link + ") _" + match[1].replace(/\n/g, " ").trim() + "_" + extra));
|
|
||||||
// b.respond("\>\>\>\> _" + match[1].replace(/\n/g, " ").trim() + "_" + extra);
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
console.log('-----------------------------------');
|
|
||||||
console.log('URL: ' + url);
|
|
||||||
console.log('ERR - - - - - - - - - - - - - - - -');
|
|
||||||
console.log(JSON.stringify(err, null, 2));
|
|
||||||
console.log('RES - - - - - - - - - - - - - - - -');
|
|
||||||
console.log(JSON.stringify(res, null, 2));
|
|
||||||
console.log('-----------------------------------');
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
await new Promise((resolve) => setTimeout(resolve, 1000));
|
|
||||||
}
|
|
||||||
}, {
|
|
||||||
id: 'get-url-metadata'
|
|
||||||
});
|
|
|
@ -1,35 +0,0 @@
|
||||||
const bot = require('bbot');
|
|
||||||
const exec = require('child_process').exec;
|
|
||||||
|
|
||||||
bot.global.text({
|
|
||||||
starts: ['pubkey','publique','rib','public','cle', 'brocket rib']
|
|
||||||
}, (b) => {
|
|
||||||
username = b.message.user.name
|
|
||||||
cmd = b.message.text
|
|
||||||
process.env.hb_username = username
|
|
||||||
process.env.hb_cmd = cmd
|
|
||||||
pubkey = exec("src/shell/g1-infos.sh pubkey $hb_username \"$hb_cmd\"", function(err, stdout, stderr) {
|
|
||||||
if (err) {
|
|
||||||
b.respond("Une erreur est survenu ...")
|
|
||||||
} else {
|
|
||||||
b.respond(stdout)
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}, {
|
|
||||||
id: 'g1-pubkey'
|
|
||||||
});
|
|
||||||
|
|
||||||
bot.global.text({
|
|
||||||
contains: ['membre','membres']
|
|
||||||
}, (b) => {
|
|
||||||
membres = exec("src/shell/g1-infos.sh membres", function(err, stdout, stderr) {
|
|
||||||
if (err) {
|
|
||||||
b.respond("Une erreur est survenu ...")
|
|
||||||
} else {
|
|
||||||
b.respond(stdout)
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}, {
|
|
||||||
id: 'g1-membres'
|
|
||||||
});
|
|
||||||
|
|
|
@ -1,16 +0,0 @@
|
||||||
module.exports = (robot) =>
|
|
||||||
{
|
|
||||||
robot.respond( /aide/i, (res) =>
|
|
||||||
res.reply( `QWant est ton ami...
|
|
||||||
... Nan j'déconne, voici ce que je connais:
|
|
||||||
- *biz aide*: Affiche cette aide
|
|
||||||
- *biz liens*: Donne des liens utiles
|
|
||||||
- *index pads*: Donne le lien vers l'index de nos pads
|
|
||||||
- *membres*: Affiche le nombre de membres actuelles de la Ğ1
|
|
||||||
- *pubkey*: Affiche sa propre clé publique Ğ1
|
|
||||||
- *axiom adhérents*: Affiche les adhérents de l'association
|
|
||||||
- *axiom cagnotte*: Affiche le status de la cagnotte de l'association
|
|
||||||
- Massages Viet pour 150Ğ1
|
|
||||||
- Et bien d'autres choses, je vais pas tout te dire non plus !! :rofl:` )
|
|
||||||
)
|
|
||||||
}
|
|
|
@ -1,12 +0,0 @@
|
||||||
module.exports = (robot) =>
|
|
||||||
{
|
|
||||||
robot.hear( /index pad/i, res=> res.send(":arrow_right: https://pad.p2p.legal/axiom_index-pads") )
|
|
||||||
robot.hear( /index des pad/i, res=> res.send(":arrow_right: https://pad.p2p.legal/axiom_index-pads") )
|
|
||||||
robot.respond( /lien/i, res=> res.send(`*Index de tous nos documents* :arrow_right: https://pad.p2p.legal/axiom_index-pads
|
|
||||||
*Site officiel de l'association Axiom-Team* :arrow_right: https://axiom-team.fr/
|
|
||||||
*Forum de l'asso axiom-team* :arrow_right: https://forum.axiom-team.fr/
|
|
||||||
*Cloud publique axiom - Ressources Agora* :arrow_right: https://cloud.p2p.legal/s/DDbKi2pqdEmixS9
|
|
||||||
*Cloud interne axiom - Nécessite un accès* :arrow_right: https://cloud.p2p.legal/f/204193`
|
|
||||||
) )
|
|
||||||
|
|
||||||
}
|
|
|
@ -1,13 +0,0 @@
|
||||||
*Voici ce que je sais faire ...*
|
|
||||||
|
|
||||||
```
|
|
||||||
- biz aide: Affiche cette aide
|
|
||||||
- biz liens: Donne des liens utiles
|
|
||||||
- index pads: Donne le lien vers l'index de nos pads
|
|
||||||
- membres: Affiche le nombre de membres actuelles de la Ğ1
|
|
||||||
- pubkey [pseudo]: Affiche sa propre clé publique Ğ1 si [pseudo] n'est pas renseigné, ou bien celle du pseudo indiqué
|
|
||||||
- axiom adhérents: Affiche les adhérents de l'association
|
|
||||||
- axiom cagnotte: Affiche le status de la cagnotte de l'association
|
|
||||||
- Massages Viet pour 150Ğ1
|
|
||||||
- Et bien d'autres choses, je vais pas tout te dire non plus !! 🤣
|
|
||||||
```
|
|
|
@ -1,6 +0,0 @@
|
||||||
index pad !! https://pad.p2p.legal/axiom_index-pads
|
|
||||||
Site officiel de l'association Axiom-Team !! https://axiom-team.fr/
|
|
||||||
Forum de l'asso axiom-team !! https://forum.axiom-team.fr/
|
|
||||||
Cloud publique axiom - Ressources Agora !! https://cloud.p2p.legal/s/DDbKi2pqdEmixS9
|
|
||||||
Cloud interne axiom _(Nécessite un accès)_ !! https://cloud.p2p.legal/f/204193`
|
|
||||||
|
|
|
@ -1,9 +0,0 @@
|
||||||
|
|
||||||
5 personnes membres vous connaissent-elles bien ? Peuvent-elles vous contacter ? Contacter votre entourage ? Avez-vous sauvegardé votre document de révocation ? Avez-vous installé un client local sur votre ordinateur/smartphone comme Cesium ?
|
|
||||||
|
|
||||||
Si oui -> vous connaissez certainement ces personnes vous aussi, et pouvez leur demander.
|
|
||||||
Si non -> il va vous falloir créer des liens avec des membres, conformément à la **[licence](https://duniter.org/fr/wiki/licence-g1/)** que vous devez lire, comprendre et accepter.
|
|
||||||
|
|
||||||
Je vous invite également à lire le **[guide du débutant](https://forum.monnaie-libre.fr/t/00-intro-guide-du-debutant-en-monnaie-libre-g1-june/2777)**, et surtout à vous renseigner sur les rencontres de présentation de la monnaie libre autour de chez vous, pour créer des relations humaines réelles.
|
|
||||||
|
|
||||||
Bienvenue, et bonnes découvertes !
|
|
|
@ -1,6 +0,0 @@
|
||||||
OBSCURANTISTE!
|
|
||||||
MENTEUR!
|
|
||||||
Toute mlc ne sert qu'à nuire à l’eveil de conscience sur la création monétaire.
|
|
||||||
Avez vous déjà vérifié les arguments (fallacieux) servis par les rabatteurs de mlc?
|
|
||||||
Les mlc coutent un bras au profit des banques et de quelques « chiens de garde» de leur salaire en unl qui en découle (rabatteurs).
|
|
||||||
La plus grosse mlc de l’histoire j’ai analysé: La mlc argentine en 2001. Elle a permis l’emergence de Monsanto compagny en 2002. N’hésitez pas à vérifier.
|
|
|
@ -1,23 +0,0 @@
|
||||||
const bot = require('bbot');
|
|
||||||
const exec = require('child_process').exec;
|
|
||||||
const fs = require('fs');
|
|
||||||
|
|
||||||
bot.global.text({ contains: ['vtfn','si tes pas content','si t\'es pas content'] }, (b) => b.respond(":arrow_right: https://vatefairecuireunnem.com/"), {
|
|
||||||
id: 'joke-vtfn'
|
|
||||||
})
|
|
||||||
|
|
||||||
bot.global.text({ contains: ['biz présente toi'] }, (b) => b.respond(":arrow_right: https://matiou.biz"), {
|
|
||||||
id: 'joke-presente'
|
|
||||||
})
|
|
||||||
|
|
||||||
// L'infernal matiou sur les MLC ...
|
|
||||||
let bizbi = fs.readFileSync('./src/inc/repliques-mlc.txt', 'utf8');
|
|
||||||
bizbi = bizbi.split('\n')
|
|
||||||
function randomize(toRand) {
|
|
||||||
resultRand = toRand[Math.floor(Math.random()*toRand.length)]
|
|
||||||
return resultRand;
|
|
||||||
}
|
|
||||||
bot.global.text({ contains: ['mlc'] }, (b) => b.respond(randomize(bizbi)), {
|
|
||||||
id: 'joke-presente'
|
|
||||||
})
|
|
||||||
|
|
|
@ -1,21 +0,0 @@
|
||||||
const bot = require('bbot');
|
|
||||||
const exec = require('child_process').exec;
|
|
||||||
const fs = require('fs');
|
|
||||||
const util = require('util')
|
|
||||||
|
|
||||||
bot.global.text({
|
|
||||||
contains: ['biz lien','biz liens']
|
|
||||||
}, (b) => {
|
|
||||||
cmd = b.message.text
|
|
||||||
process.env.hb_cmd = cmd
|
|
||||||
membres = exec("src/shell/liens.sh $hb_cmd", function(err, stdout, stderr) {
|
|
||||||
if (err) {
|
|
||||||
b.respond("Une erreur est survenu ...")
|
|
||||||
} else {
|
|
||||||
b.respond(stdout)
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}, {
|
|
||||||
id: 'biz-liens'
|
|
||||||
});
|
|
||||||
|
|
|
@ -1,23 +0,0 @@
|
||||||
|
|
||||||
const bot = require('bbot');
|
|
||||||
const globe_delay = 60000; // 1 minute
|
|
||||||
var globe_said = {};
|
|
||||||
|
|
||||||
bot.global.text({
|
|
||||||
contains: ['facebook', 'google', 'amazon', 'apple', 'microsoft']
|
|
||||||
}, (b) => {
|
|
||||||
b.respondVia('react', ':hear_no_evil:');
|
|
||||||
}, {
|
|
||||||
id: 'gafam-react'
|
|
||||||
});
|
|
||||||
|
|
||||||
bot.global.text(
|
|
||||||
/pe?tit? globe/i
|
|
||||||
, (b) => {
|
|
||||||
if (!globe_said[b.message.user.room] || new Date().getTime() > globe_said[b.message.user.room] + globe_delay) {
|
|
||||||
b.respond('![pti globe](https://crapaud-fou.org/images/chat-ptiglobe.png)');
|
|
||||||
globe_said[b.message.user.room] = new Date().getTime();
|
|
||||||
}
|
|
||||||
}, {
|
|
||||||
id: 'ptiglobe-direct'
|
|
||||||
})
|
|
|
@ -1,22 +0,0 @@
|
||||||
const bot = require('bbot');
|
|
||||||
const exec = require('child_process').exec;
|
|
||||||
|
|
||||||
bot.global.text({
|
|
||||||
is: ['biz reload']
|
|
||||||
}, (b) => {
|
|
||||||
function reload() {
|
|
||||||
pubkey = exec("pm2 reload index --force", function(err, stdout, stderr) {
|
|
||||||
if (err) {
|
|
||||||
b.respond("Une erreur est survenu: " + " - " + stderr)
|
|
||||||
} else {
|
|
||||||
b.respond("Biz a été rechargé")
|
|
||||||
}
|
|
||||||
});
|
|
||||||
};
|
|
||||||
|
|
||||||
b.respond("Biz redémarre ... OK dans 5 secondes")
|
|
||||||
setTimeout(reload, 10);
|
|
||||||
|
|
||||||
}, {
|
|
||||||
id: 'reload-scripts'
|
|
||||||
});
|
|
|
@ -1,12 +0,0 @@
|
||||||
const bot = require('bbot');
|
|
||||||
const exec = require('child_process').exec;
|
|
||||||
const fs = require('fs');
|
|
||||||
const util = require('util')
|
|
||||||
|
|
||||||
bot.global.text({ contains: ['me certifier','me faire certifier','je cherche une certification','je cherche des certifications'] }, (b) => {
|
|
||||||
// Lisez la licence Ḡ1 ...
|
|
||||||
let newml = fs.readFileSync('./src/inc/need-certif.txt', 'utf8');
|
|
||||||
b.respond("Bonjour, et bienvenue @" + b.message.user.name + " ! =)" + newml)
|
|
||||||
}, {
|
|
||||||
id: 'rep-certif'
|
|
||||||
});
|
|
|
@ -1,21 +0,0 @@
|
||||||
#!/bin/bash
|
|
||||||
|
|
||||||
auto() {
|
|
||||||
echo "*Je suis l'aide auto*"
|
|
||||||
cd src
|
|
||||||
|
|
||||||
#cmds=$(grep "^bot\." *.js -A3 | grep -E "\['|aide = ")
|
|
||||||
cmds=$(grep "\['" *.js | awk -F "[" '{ print $2 }' | awk -F "]" '{ print $1 }')
|
|
||||||
IFS=$'\n'
|
|
||||||
for i in $cmds; do
|
|
||||||
echo "$i" | awk -F "'" '{ print $2 }'
|
|
||||||
done
|
|
||||||
}
|
|
||||||
|
|
||||||
text() {
|
|
||||||
cat src/inc/aide.txt
|
|
||||||
}
|
|
||||||
|
|
||||||
$@
|
|
||||||
|
|
||||||
exit 0
|
|
|
@ -1,28 +0,0 @@
|
||||||
#!/bin/bash
|
|
||||||
|
|
||||||
node="https://duniter-g1.p2p.legal"
|
|
||||||
|
|
||||||
pubkey() {
|
|
||||||
url="$node/wot/members"
|
|
||||||
if [[ "$@" =~ "brocket" ]]; then
|
|
||||||
[[ $4 ]] && username=$4 || username=$1
|
|
||||||
else
|
|
||||||
[[ $3 ]] && username=$3 || username=$1
|
|
||||||
fi
|
|
||||||
username=$(echo $username | tr -d '@')
|
|
||||||
local pubkey=$(curl -m 5 -s $url | grep -w -i -B 1 $username | grep "pubkey" | awk -F '"' '{ print $4 }')
|
|
||||||
# TODO: local pubkey=$(curl -m 5 -s $url | jq -r --arg username "$username" '.results[] | select(.uid=="$username") | .pubkey')
|
|
||||||
[[ $pubkey ]] && echo "@$username Ta clé publique Ğ1 est: $pubkey" || echo "@$username n'est pas pseudo membre de la Ḡ1"
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
membres() {
|
|
||||||
url="$node/blockchain/current"
|
|
||||||
local nbr_membres=$(curl -m 5 -s $url | jq '.membersCount')
|
|
||||||
[[ $nbr_membres ]] && echo "Il y a actuellement $nbr_membres membres de la Ğ1 !" || echo "Service en maintenance, réessayez dans un instant :coffee:"
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
$@
|
|
||||||
|
|
||||||
exit 0
|
|
|
@ -1,25 +0,0 @@
|
||||||
#!/bin/bash
|
|
||||||
|
|
||||||
ids="axiom-team:tYrjD6rrfStJXBqHhzNET"
|
|
||||||
ha="https://api.helloasso.com/v3"
|
|
||||||
|
|
||||||
adherents() {
|
|
||||||
url="$ha/campaigns/000001053192/actions.json?type"
|
|
||||||
curl -m 5 --user $ids -s $url | jq -r '.resources[] | .date + " , " + .first_name + " " + .last_name + " - " + .email' | sed 's/T.*,//'
|
|
||||||
}
|
|
||||||
|
|
||||||
adherentsSoft() {
|
|
||||||
url="$ha/campaigns/000001053192/actions.json?type"
|
|
||||||
curl -m 5 --user $ids -s $url | jq -r '.resources[] | .date + " , " + .first_name + " " + .last_name' | sed 's/T.*,//'
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
cagnotte() {
|
|
||||||
url="$ha/campaigns/000001053192.json"
|
|
||||||
curl -m 5 --user $ids -s $url | jq -r '.name, {"Donnateurs": .supporters},{"Fonds":.funding},.url' | grep -v '{|}'
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
$@
|
|
||||||
|
|
||||||
exit 0
|
|
|
@ -1,12 +0,0 @@
|
||||||
#!/bin/bash
|
|
||||||
|
|
||||||
if [[ -z $3 ]]; then
|
|
||||||
res=$(sed 's/!!/:arrow_right:/g' src/inc/liens.txt)
|
|
||||||
else
|
|
||||||
shift 2
|
|
||||||
res=$(sed 's/!!/:arrow_right:/g' src/inc/liens.txt | grep -i "$@")
|
|
||||||
fi
|
|
||||||
|
|
||||||
[[ $res ]] && echo "$res" || echo "Aucun lien trouvé avec **$@**"
|
|
||||||
|
|
||||||
exit 0
|
|
|
@ -1 +0,0 @@
|
||||||
../ssrc/
|
|
Loading…
Reference in New Issue