MCPcopy Create free account
hub / github.com/TGX-Android/Publisher / onExit

Function onExit

main.js:3816–3833  ·  view source on GitHub ↗
(signal, arg1, arg2, callback)

Source from the content-addressed store, hash-verified

3814 bot.bot.sendMessage(ADMIN_USER_ID, 'Polling error…\n' + error).catch(globalErrorHandler());
3815 });
3816});
3817/*bot.on('inline_query', (query) => {
3818 console.log('inline query', JSON.stringify(query));
3819});
3820bot.on('chosen_inline_result', (result) => {
3821 console.log('inline result', JSON.stringify(result));
3822});*/
3823
3824async function onExit (signal, arg1, arg2, callback) {
3825 cur.exiting = true;
3826 if (cur.pending_build && cur.pending_build.abort) {
3827 console.log('Aborting current build manually…');
3828 cur.pending_build.abort(() => {
3829 onExit(signal, arg1, arg2, callback);
3830 });
3831 return;
3832 }
3833 if (!isOffline()) {
3834 try {
3835 await botMap['private'].sendMessage(ADMIN_USER_ID, 'Bot stopped.');
3836 } catch (ignored) {}

Callers 1

main.jsFile · 0.85

Calls 2

isOfflineFunction · 0.85
stopServerFunction · 0.85

Tested by

no test coverage detected