Skip to content

Commit

Permalink
Merge branch 'dev'
Browse files Browse the repository at this point in the history
  • Loading branch information
Vivien Mouret committed Aug 2, 2023
2 parents 41ed4ab + ffef071 commit db93dd3
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 6 deletions.
19 changes: 16 additions & 3 deletions core/mobbot.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ class MobBot {
await this.onReSubsciption();
await this.onCheers();

this.mbClient.on('connectFailed', function(error) {
this.mbClient.on('connectFailed', function (error) {
console.log('Connect Error: ' + error.toString());
});

Expand Down Expand Up @@ -169,13 +169,13 @@ class MobBot {

for (let i in message.split(' ')) {
if (message.split(' ')[i].toLowerCase() === '@mobbot_') {
this.mbClient.reply(channel, 'qu\'est-ce ?', userstate.id)
this.mbClient.reply(channel, 'yes, sir ?', userstate.id)
.catch(e => console.log(e));
};
};

this._count++;
if (_rdm < .175 && this._count % 2 === 0 && this._count > 8) {
if (this.live && this._count % 2 === 0 && this._count >= 8) {
await this.mbCommands
.get('timer')
.execute(this.mbClient,
Expand All @@ -196,6 +196,19 @@ class MobBot {
this.mbClient.reply(channel, `ALL SYSTEMS ARE OFFLINE MrDestructoid`, userstate.id)
.catch(e => console.log(e));
};

while (this.live) {
await this.mbCommands
.get('timer')
.execute(this.mbClient,
channel,
message,
userstate,
await this.onLastVideo(),
await this.onTimeStamp(),
true);
await new Promise(resolve => setTimeout(resolve, 600000)); // 10 minutes
};
});
};

Expand Down
6 changes: 4 additions & 2 deletions core/subcommands/ig.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@ module.exports = {
description: 'a dynamic instant-gaming link'
},
async execute(client, channel, message, userstate, urI, timestamp, autoPost) {
client.say(channel, `daft est maintenant affilié à instant-gaming ! profites des promotions exceptionnelles de Terry en utilisant ce lien https://www.instant-gaming.com/?igr=daftmob daftmo1Gotanitem`)
.catch(e => console.log(e));
client.say(channel, `daft est maintenant affilié à instant-gaming,
profites des promotions exceptionnelles de Terry en passant par ce lien https://www.instant-gaming.com/?igr=daftmob daftmo1Gotanitem
et tentes de gagner des jeux gratuits en participant aux giveaway avec mon lien https://www.instant-gaming.com/fr/giveaway/instantgaming?igr=daftmob daftmo1Diosama`)
.catch(e => console.log(e));
}
};
3 changes: 2 additions & 1 deletion core/subcommands/timer.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ module.exports = {
'check quand je passe en live avec le twitter https://twitter.com/daftm0b Kappa',
`Terry t'offre une montagne de réduction sur Instant-Gaming en utilisant ce lien https://www.instant-gaming.com/?igr=daftmob daftmo1Gotanitem`,
`rejoins l\'ordre de daft en lâchant ton Prime ou en trouvant le chemin de la force https://www.twitch.tv/products/daftmob daftmo1Gotanitem`,
'avec le discord du daft https://discord.gg/ucwnMKKxZe et/ou avec son twitter https://twitter.com/daftm0b daftmo1Whaaa, tiens-toi au courant des prochains lives !'
'avec le discord du daft https://discord.gg/ucwnMKKxZe et/ou avec son twitter https://twitter.com/daftm0b daftmo1Whaaa, tiens-toi au courant des prochains lives !',
'tentes de gagner des jeux gratuits en participant aux giveaway avec mon lien https://www.instant-gaming.com/fr/giveaway/instantgaming?igr=daftmob daftmo1Diosama'
];

client.say(channel, `daft est en live depuis ${timestamp}, ` + mtpPhrases[randomIntFromInterval(0, mtpPhrases.length - 1)])
Expand Down

0 comments on commit db93dd3

Please sign in to comment.