remove duplicate data value

and
set up my Robot ...
This commit is contained in:
red 2025-12-05 09:57:10 +00:00
parent 2881b4ff4f
commit 4e2c14275b
6 changed files with 29 additions and 6 deletions

5
.gitignore vendored
View File

@ -21,3 +21,8 @@ yarn-error.log
/.nova
/.vscode
/.zed
/bin
/include
/lib
/lib64
pyvenv.cfg

View File

@ -15,13 +15,10 @@ class Participant extends Model
'giving_id',
'prompt',
'submission_url',
'desperate',
'token',
];
protected $casts = [
'desperate' => 'boolean',
];
protected $appends = ['desperate'];
public function receiver()
{
@ -70,4 +67,13 @@ class Participant extends Model
->whereDoesntHave('receiver');
}
public function getDesperateAttribute(): bool
{
$gives = !is_null($this->giver);
$gets = !is_null($this->receiver);
return ($gives && !$gets) || (!$gives && $gets);
}
}

4
bot/.env.example Normal file
View File

@ -0,0 +1,4 @@
SKETCHERS_UNITED_SESSION=
XSRF_TOKEN=
REMEMBER_WEB=
API_PASSWORD=

5
bot/main.py Normal file
View File

@ -0,0 +1,5 @@
- get chats page
- for each
- if seen_at is less than latest[created_at]
- get token url from api
- respond to that user

View File

@ -22,7 +22,6 @@ return new class extends Migration
$table->string('prompt')->nullable();
$table->string('submission_url')->nullable();
$table->boolean('desperate')->default(false);
$table->string('token');
$table->timestamps();
});

View File

@ -157,10 +157,14 @@ $cancelEditingSubmission = function () {
{{$receiverPrompt}} Nothing yet, probably!
</div>
</div>
- withdraw
- bot
<div class="other-content">
<h2> Are you done? </h2>
<p>You will be able to link to your gift below once submissions are accepted on 22nd December.</p>
<small style="color:rgba(255,255,255,0.5)">submissions will be accepted up until 10th of january</small>
<small style="color:rgba(255,255,255,0.5)">submissions will be accepted up until 5th of january but before then is much more appreciated!</small>
{{-- @if($isEditingSubmission)--}}
{{-- <form wire:submit="saveEditingSubmission">--}}