A
A
Alexey2022-03-21 20:00:22
go
Alexey, 2022-03-21 20:00:22

How to host multiple telegram bots on a server?

There is a server with ISPManager installed, it has php in conjunction with nginx and mysql
. There are two telegram bots written in java.
How to bind domains or subdomains to bots and so that it does not conflict with the manager?

Answer the question

In order to leave comments, you need to log in

4 answer(s)
V
Vyacheslav, 2016-06-23
@VGrabko

Smoke towards the cuts.
a:='abcdefghijk'[0:4]
b:='abcdefghijk'[4:8]

K
Kana, 2016-06-23
@kana-desu

Run on play.golang

package main

import (
  "fmt"
)

func min(a, b int) int {
  if a < b {
    return a
  }

  return b
}

func splitIntoChunks(s string, chunkLength int) []string {
  length := len(s)

  chunksCount := length / chunkLength
  if length%chunkLength != 0 {
    chunksCount += 1
  }

  chunks := make([]string, chunksCount)

  for i := range chunks {
    from := i * chunkLength
    to := min(length, from+chunkLength)
    chunks[i] = s[from:to]
  }

  return chunks
}

func main() {
  s := "aaabbbcccdddeeee"
  fmt.Println(splitIntoChunks(s, 3))
}

A
Alexander Karabanov, 2022-03-21
@karabanov

Write your template .

O
Orkhan, 2022-03-21
Hasanly @azerphoenix

You can raise the docker so that the applications do not intersect at all.
+ register the necessary records for domains

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question