/** * Execute the console command. * * @return mixed */ public function fire(Userbot $userbot) { foreach (config('slack.channels-to-manage') as $channelId) { $channel = Channel::findBySlackId($channelId); $userbot->manageChannel($channel); } }
/** * Execute the console command. * * @return mixed */ public function fire(Userbot $userbot, ApiMonkey $api) { $user = User::create(['char_id' => $this->argument('char_id'), 'char_name' => $api->getCharName($this->argument('char_id')), 'email' => $this->argument('email'), 'password' => Userbot::generatePassword(16), 'next_check' => \Carbon\Carbon::now('UTC')]); $userbot->updateSingle($user->char_id); $userbot->linkSlackMembers(); $user->save(); $this->info('User created and API work done.'); }
public function handleProviderCallback() { $char = Socialize::with('eveonline')->user(); try { $user = User::where('char_id', $char->id)->firstOrFail(); } catch (ModelNotFoundException $e) { $user = User::createAndFill(['char_id' => $char->id, 'char_name' => $char->name, 'password' => Userbot::generatePassword(16), 'next_check' => \Carbon\Carbon::now('UTC')]); } Auth::login($user, true); return redirect('home'); }
/** * Execute the console command. * * @param Userbot $userbot * * @return mixed */ public function fire(Userbot $userbot) { $userbot->readNewStandings(); }
/** * Execute the console command. * * @return mixed */ public function fire(Userbot $userbot) { $userbot->performUpdates(); $userbot->linkSlackMembers(); $userbot->setSlackInactives(); }
/** * Execute the console command. * * @param Userbot $userbot * * @return mixed */ public function fire(Userbot $userbot) { $userbot->performUpdates(); }
/** * Execute the console command. * * @return mixed */ public function fire(Userbot $userbot) { $userbot->getNewChannels(); }
/** * Execute the console command. * * @return mixed */ public function fire(Userbot $userbot) { //$slack->setName('U04LH952N', '[CVA|CALVU]', 'Rollo'); //print($api->getAllianceTicker(1988009451)."\n"); $userbot->checkNames(); }
/** * @param int $charId */ public function sendSingleAffiliation($charId) { $result = $this->pheal->eveScope->CharacterAffiliation(['ids' => $charId]); $this->userbot->updateAffiliations($result); }
/** * @param $length * * @return string * @throws \Exception */ public static function generatePassword($length) { return substr(preg_replace("/[^a-zA-Z0-9]/", "", base64_encode(Userbot::getRandomBytes($length + 1))), 0, $length); }
/** * @param array $charArray * * @return User */ public static function createAndFill($charArray) { $user = User::create($charArray); $userbot = new Userbot(); $userbot->updateSingle($charArray['char_id']); return $user; }
/** * Execute the console command. * * @param Userbot $userbot * * @return mixed */ public function fire(Userbot $userbot) { $userbot->linkSlackMembers(); }
/** * Execute the console command. * * @param Userbot $userbot * * @return mixed */ public function fire(Userbot $userbot) { $userbot->setSlackInactives(); }