test
This commit is contained in:
parent
e7a38528e4
commit
a06f395920
1
.gitignore
vendored
1
.gitignore
vendored
@ -1,3 +1,4 @@
|
||||
vendor/
|
||||
composer.lock
|
||||
pozitie.jpg
|
||||
token.txt
|
||||
|
15
Dockerfile
Normal file
15
Dockerfile
Normal 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"]
|
8
bot.php
8
bot.php
@ -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()
|
||||
]);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user