This commit is contained in:
fzorb 2025-01-10 20:34:17 +02:00
parent e7a38528e4
commit a06f395920
3 changed files with 22 additions and 2 deletions

1
.gitignore vendored
View File

@ -1,3 +1,4 @@
vendor/
composer.lock
pozitie.jpg
token.txt

15
Dockerfile Normal file
View File

@ -0,0 +1,15 @@
FROM php:8.2
WORKDIR /bot
RUN apt update && apt install -y libfreetype6-dev libjpeg62-turbo-dev libpng-dev git unzip
RUN docker-php-ext-configure gd --with-freetype --with-jpeg && docker-php-ext-install -j$(nproc) gd
RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
COPY composer.json /bot
RUN composer install
COPY . /bot
CMD ["php", "bot.php"]

View File

@ -5,12 +5,16 @@ use Discord\Discord;
use Discord\Parts\Channel\Message;
use Discord\WebSockets\Intents;
use Discord\WebSockets\Event;
use Discord\Parts\Interactions\Command\Command; // Please note to use this correct namespace!
use Discord\Parts\Interactions\Command\Command;
use Discord\Parts\Interactions\Interaction;
use Discord\Builders\MessageBuilder;
$tokenf = fopen("./token.txt", "r") or die("PULAAAAAAAAAAAAA");
$token = trim(stream_get_contents($tokenf));
fclose($tokenf);
$discord = new Discord([
'token' => 'MTMyNjQzMTc1MjIzNDczMzY0OQ.GD846-.Mfl6iv39czVqdIVuS3nFxClDD9zymEvndti5-U',
'token' => $token,
'intents' => Intents::getDefaultIntents()
]);