Skip to content

playoriginstory/refusesbot

Repository files navigation

Dependencies, Build and Deployment Instructions

C#

IDE

Dependencies

Option A

Using the nuget window in your IDE, add Telegram.Bot and Telegram.Bot.Extensions.Polling to your packages.

Option B

Type these commands in your terminal and press enter after each one.

dotnet add package Telegram.Bot
dotnet add package Telegram.Bot.Extensions.Polling

Export Your Project

Option A

Type this command in your terminal and press enter.

dotnet publish -c release --self-contained --runtime linux-x64 

Copy everything from bin/release/netXXX/linux-x64 to your TBotRemote folder.

Option B

Type this command in your terminal and press enter.

dotnet build

Copy everything from bin/release/net6.0 to your TBotRemote folder.

Run Your Bot

Option A

Type these commands in your server terminal and press enter after each one.

cd TBotRemote
chmod +x TutorialBot
./TutorialBot

Option B

Type these commands in your server terminal and press enter after each one.

sudo apt-get update
sudo apt-get install -y apt-transport-https
sudo apt-get update
sudo apt-get install -y dotnet-runtime-6.0

Now that you have installed the runtime environment, run:

cd TBotRemote
dotnet TutorialBot.dll

Python

IDE

Dependencies

Type this command in your terminal and press enter.

pip install python-telegram-bot==13.12

Export Your Project

Copy your source file from your project folder to your TBotRemote folder.

Run Your Bot

Type this command in your terminal and press enter.

cd TBotRemote
python TutorialBot.py

Go

IDE

Dependencies

Type these commands in your terminal and press enter after each one.

go mod init example.com/TutorialBot
go mod tidy

Export Your Project

Option A

You can use source file as executables using go run TutorialBot.go

Option B

You can build a static executable.

Type this command in your terminal and press enter.

Nix Shell

GOOS=linux GOARCH=amd64 go build -o bot

Powershell

$env:GOOS='linux'; $env:GOARCH='amd64'; go build -o bot

Please replace GOOS and GOARCH according to your target machine.

Run Your Bot

If you're running source files directly, you'll need an up-to-date version of the Golang runtime.

Once you have installed it, type this command in your terminal and press enter.

go run bot.go

If you're running the static executable, type these commands in your terminal and press enter after each one.

cd TBotRemote
chmod +x TutorialBot
./TutorialBot

TypeScript on Node.js

IDE

Dependencies

Type these commands in your terminal and press enter.

sudo apt-get update
sudo apt-get install -y nodejs

npm install

Export Your Project

Copy your source file and package.json file from your project folder to your TBotRemote folder.

Run Your Bot

Type these commands in your terminal and press enter.

cd TBotRemote
npm install
npm start

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published