NobGit
public imalexnord read

Discord-Hetzner-Bot

No description yet

Languages

Repository composition by tracked source files.

Python
Python 100%
Create file Wiki Documentation
Clone
https://nobgit.com/user/imalexnord/discord-hetzner-bot.git
ssh://[email protected]:2222/user/imalexnord/discord-hetzner-bot.git

Trace

game.py

Trace helps you understand code history line by line. See who changed each line, when it changed, and which commit introduced it.

game.py on main
Author Date Commit Line Code
err0x5dd over 7 years ago d21b0dd

Fuck Windows line seperator

Full commit hash
d21b0ddd348aa6c47c656a723f54a5e1f08deede
Author
err0x5dd <[email protected]>
Date
over 7 years ago
Selected line
1
from hcloud import Client
Open commit View diff
1 from hcloud import Client
same change d21b0dd

Fuck Windows line seperator

Full commit hash
d21b0ddd348aa6c47c656a723f54a5e1f08deede
Author
err0x5dd <[email protected]>
Date
over 7 years ago
Selected line
2
from hcloud.images.domain import Image
Open commit View diff
2 from hcloud.images.domain import Image
same change d21b0dd

Fuck Windows line seperator

Full commit hash
d21b0ddd348aa6c47c656a723f54a5e1f08deede
Author
err0x5dd <[email protected]>
Date
over 7 years ago
Selected line
3
from hcloud.servers.domain import Server
Open commit View diff
3 from hcloud.servers.domain import Server
same change d21b0dd

Fuck Windows line seperator

Full commit hash
d21b0ddd348aa6c47c656a723f54a5e1f08deede
Author
err0x5dd <[email protected]>
Date
over 7 years ago
Selected line
4
from hcloud.server_types.domain import ServerType
Open commit View diff
4 from hcloud.server_types.domain import ServerType
same change d21b0dd

Fuck Windows line seperator

Full commit hash
d21b0ddd348aa6c47c656a723f54a5e1f08deede
Author
err0x5dd <[email protected]>
Date
over 7 years ago
Selected line
5
from hcloud.volumes.domain import Volume
Open commit View diff
5 from hcloud.volumes.domain import Volume
err0x5dd about 7 years ago 4a1e1f5

Added location infos and possibly fixed some bugs

Full commit hash
4a1e1f5b44dd695d30018a6f873c5056e0760477
Author
err0x5dd <[email protected]>
Date
about 7 years ago
Selected line
6
from hcloud.locations.domain import Location
Open commit View diff
6 from hcloud.locations.domain import Location
same change 4a1e1f5

Added location infos and possibly fixed some bugs

Full commit hash
4a1e1f5b44dd695d30018a6f873c5056e0760477
Author
err0x5dd <[email protected]>
Date
about 7 years ago
Selected line
7
import asyncio
Open commit View diff
7 import asyncio
err0x5dd over 7 years ago d21b0dd

Fuck Windows line seperator

Full commit hash
d21b0ddd348aa6c47c656a723f54a5e1f08deede
Author
err0x5dd <[email protected]>
Date
over 7 years ago
Selected line
8
Open commit View diff
8
same change d21b0dd

Fuck Windows line seperator

Full commit hash
d21b0ddd348aa6c47c656a723f54a5e1f08deede
Author
err0x5dd <[email protected]>
Date
over 7 years ago
Selected line
9
class GameData:
Open commit View diff
9 class GameData:
same change d21b0dd

Fuck Windows line seperator

Full commit hash
d21b0ddd348aa6c47c656a723f54a5e1f08deede
Author
err0x5dd <[email protected]>
Date
over 7 years ago
Selected line
10
    running = False
Open commit View diff
10 running = False
Alex Carrington 7 months ago 25636c1

Refactor game and Discord bot logic, remove samples

Full commit hash
25636c1c18b01d13a70d4374737416c3a5acab1e
Author
Alex Carrington <[email protected]>
Date
7 months ago
Selected line
11
Open commit View diff
11
err0x5dd about 7 years ago 4a1e1f5

Added location infos and possibly fixed some bugs

Full commit hash
4a1e1f5b44dd695d30018a6f873c5056e0760477
Author
err0x5dd <[email protected]>
Date
about 7 years ago
Selected line
12
    def __init__(self, token, name, servertype, snapshot, location, volume):
Open commit View diff
12 def __init__(self, token, name, servertype, snapshot, location, volume):
err0x5dd over 7 years ago d21b0dd

Fuck Windows line seperator

Full commit hash
d21b0ddd348aa6c47c656a723f54a5e1f08deede
Author
err0x5dd <[email protected]>
Date
over 7 years ago
Selected line
13
        self.name = name
Open commit View diff
13 self.name = name
Alex Carrington 7 months ago 25636c1

Refactor game and Discord bot logic, remove samples

Full commit hash
25636c1c18b01d13a70d4374737416c3a5acab1e
Author
Alex Carrington <[email protected]>
Date
7 months ago
Selected line
14
        self.servertype = servertype.strip() if isinstance(servertype, str) else servertype
Open commit View diff
14 self.servertype = servertype.strip() if isinstance(servertype, str) else servertype
err0x5dd over 7 years ago d21b0dd

Fuck Windows line seperator

Full commit hash
d21b0ddd348aa6c47c656a723f54a5e1f08deede
Author
err0x5dd <[email protected]>
Date
over 7 years ago
Selected line
15
        self.client = Client(token=token)
Open commit View diff
15 self.client = Client(token=token)
Alex Carrington 7 months ago 25636c1

Refactor game and Discord bot logic, remove samples

Full commit hash
25636c1c18b01d13a70d4374737416c3a5acab1e
Author
Alex Carrington <[email protected]>
Date
7 months ago
Selected line
16
Open commit View diff
16
same change 25636c1

Refactor game and Discord bot logic, remove samples

Full commit hash
25636c1c18b01d13a70d4374737416c3a5acab1e
Author
Alex Carrington <[email protected]>
Date
7 months ago
Selected line
17
        # --- snapshot/image (optional) ---
Open commit View diff
17 # --- snapshot/image (optional) ---
same change 25636c1

Refactor game and Discord bot logic, remove samples

Full commit hash
25636c1c18b01d13a70d4374737416c3a5acab1e
Author
Alex Carrington <[email protected]>
Date
7 months ago
Selected line
18
        # If snapshot is None => we'll fall back to Ubuntu 24.04 in start()
Open commit View diff
18 # If snapshot is None => we'll fall back to Ubuntu 24.04 in start()
same change 25636c1

Refactor game and Discord bot logic, remove samples

Full commit hash
25636c1c18b01d13a70d4374737416c3a5acab1e
Author
Alex Carrington <[email protected]>
Date
7 months ago
Selected line
19
        self.snapshot = None
Open commit View diff
19 self.snapshot = None
same change 25636c1

Refactor game and Discord bot logic, remove samples

Full commit hash
25636c1c18b01d13a70d4374737416c3a5acab1e
Author
Alex Carrington <[email protected]>
Date
7 months ago
Selected line
20
        if snapshot is not None:
Open commit View diff
20 if snapshot is not None:
same change 25636c1

Refactor game and Discord bot logic, remove samples

Full commit hash
25636c1c18b01d13a70d4374737416c3a5acab1e
Author
Alex Carrington <[email protected]>
Date
7 months ago
Selected line
21
            images = self.client.images.get_all()
Open commit View diff
21 images = self.client.images.get_all()
same change 25636c1

Refactor game and Discord bot logic, remove samples

Full commit hash
25636c1c18b01d13a70d4374737416c3a5acab1e
Author
Alex Carrington <[email protected]>
Date
7 months ago
Selected line
22
            for img in images:
Open commit View diff
22 for img in images:
same change 25636c1

Refactor game and Discord bot logic, remove samples

Full commit hash
25636c1c18b01d13a70d4374737416c3a5acab1e
Author
Alex Carrington <[email protected]>
Date
7 months ago
Selected line
23
                # support matching by description OR name
Open commit View diff
23 # support matching by description OR name
same change 25636c1

Refactor game and Discord bot logic, remove samples

Full commit hash
25636c1c18b01d13a70d4374737416c3a5acab1e
Author
Alex Carrington <[email protected]>
Date
7 months ago
Selected line
24
                if img.data_model.description == snapshot or img.data_model.name == snapshot:
Open commit View diff
24 if img.data_model.description == snapshot or img.data_model.name == snapshot:
same change 25636c1

Refactor game and Discord bot logic, remove samples

Full commit hash
25636c1c18b01d13a70d4374737416c3a5acab1e
Author
Alex Carrington <[email protected]>
Date
7 months ago
Selected line
25
                    self.snapshot = img.data_model.id
Open commit View diff
25 self.snapshot = img.data_model.id
same change 25636c1

Refactor game and Discord bot logic, remove samples

Full commit hash
25636c1c18b01d13a70d4374737416c3a5acab1e
Author
Alex Carrington <[email protected]>
Date
7 months ago
Selected line
26
                    break
Open commit View diff
26 break
same change 25636c1

Refactor game and Discord bot logic, remove samples

Full commit hash
25636c1c18b01d13a70d4374737416c3a5acab1e
Author
Alex Carrington <[email protected]>
Date
7 months ago
Selected line
27
            if self.snapshot is None:
Open commit View diff
27 if self.snapshot is None:
same change 25636c1

Refactor game and Discord bot logic, remove samples

Full commit hash
25636c1c18b01d13a70d4374737416c3a5acab1e
Author
Alex Carrington <[email protected]>
Date
7 months ago
Selected line
28
                raise ValueError(f"Snapshot/Image not found: {snapshot}")
Open commit View diff
28 raise ValueError(f"Snapshot/Image not found: {snapshot}")
same change 25636c1

Refactor game and Discord bot logic, remove samples

Full commit hash
25636c1c18b01d13a70d4374737416c3a5acab1e
Author
Alex Carrington <[email protected]>
Date
7 months ago
Selected line
29
Open commit View diff
29
same change 25636c1

Refactor game and Discord bot logic, remove samples

Full commit hash
25636c1c18b01d13a70d4374737416c3a5acab1e
Author
Alex Carrington <[email protected]>
Date
7 months ago
Selected line
30
        # --- location (required) ---
Open commit View diff
30 # --- location (required) ---
same change 25636c1

Refactor game and Discord bot logic, remove samples

Full commit hash
25636c1c18b01d13a70d4374737416c3a5acab1e
Author
Alex Carrington <[email protected]>
Date
7 months ago
Selected line
31
        self.location = None
Open commit View diff
31 self.location = None
err0x5dd about 7 years ago 4a1e1f5

Added location infos and possibly fixed some bugs

Full commit hash
4a1e1f5b44dd695d30018a6f873c5056e0760477
Author
err0x5dd <[email protected]>
Date
about 7 years ago
Selected line
32
        locations = self.client.locations.get_all()
Open commit View diff
32 locations = self.client.locations.get_all()
Alex Carrington 7 months ago 25636c1

Refactor game and Discord bot logic, remove samples

Full commit hash
25636c1c18b01d13a70d4374737416c3a5acab1e
Author
Alex Carrington <[email protected]>
Date
7 months ago
Selected line
33
        for loc in locations:
Open commit View diff
33 for loc in locations:
same change 25636c1

Refactor game and Discord bot logic, remove samples

Full commit hash
25636c1c18b01d13a70d4374737416c3a5acab1e
Author
Alex Carrington <[email protected]>
Date
7 months ago
Selected line
34
            if loc.data_model.name == location:
Open commit View diff
34 if loc.data_model.name == location:
same change 25636c1

Refactor game and Discord bot logic, remove samples

Full commit hash
25636c1c18b01d13a70d4374737416c3a5acab1e
Author
Alex Carrington <[email protected]>
Date
7 months ago
Selected line
35
                self.location = loc.data_model.id
Open commit View diff
35 self.location = loc.data_model.id
same change 25636c1

Refactor game and Discord bot logic, remove samples

Full commit hash
25636c1c18b01d13a70d4374737416c3a5acab1e
Author
Alex Carrington <[email protected]>
Date
7 months ago
Selected line
36
                break
Open commit View diff
36 break
same change 25636c1

Refactor game and Discord bot logic, remove samples

Full commit hash
25636c1c18b01d13a70d4374737416c3a5acab1e
Author
Alex Carrington <[email protected]>
Date
7 months ago
Selected line
37
        if self.location is None:
Open commit View diff
37 if self.location is None:
same change 25636c1

Refactor game and Discord bot logic, remove samples

Full commit hash
25636c1c18b01d13a70d4374737416c3a5acab1e
Author
Alex Carrington <[email protected]>
Date
7 months ago
Selected line
38
            raise ValueError(f"Location not found: {location}")
Open commit View diff
38 raise ValueError(f"Location not found: {location}")
same change 25636c1

Refactor game and Discord bot logic, remove samples

Full commit hash
25636c1c18b01d13a70d4374737416c3a5acab1e
Author
Alex Carrington <[email protected]>
Date
7 months ago
Selected line
39
Open commit View diff
39
same change 25636c1

Refactor game and Discord bot logic, remove samples

Full commit hash
25636c1c18b01d13a70d4374737416c3a5acab1e
Author
Alex Carrington <[email protected]>
Date
7 months ago
Selected line
40
        # --- volume (optional) ---
Open commit View diff
40 # --- volume (optional) ---
same change 25636c1

Refactor game and Discord bot logic, remove samples

Full commit hash
25636c1c18b01d13a70d4374737416c3a5acab1e
Author
Alex Carrington <[email protected]>
Date
7 months ago
Selected line
41
        self.volume = None
Open commit View diff
41 self.volume = None
same change 25636c1

Refactor game and Discord bot logic, remove samples

Full commit hash
25636c1c18b01d13a70d4374737416c3a5acab1e
Author
Alex Carrington <[email protected]>
Date
7 months ago
Selected line
42
        if volume is not None:
Open commit View diff
42 if volume is not None:
same change 25636c1

Refactor game and Discord bot logic, remove samples

Full commit hash
25636c1c18b01d13a70d4374737416c3a5acab1e
Author
Alex Carrington <[email protected]>
Date
7 months ago
Selected line
43
            volumes = self.client.volumes.get_all()
Open commit View diff
43 volumes = self.client.volumes.get_all()
same change 25636c1

Refactor game and Discord bot logic, remove samples

Full commit hash
25636c1c18b01d13a70d4374737416c3a5acab1e
Author
Alex Carrington <[email protected]>
Date
7 months ago
Selected line
44
            for vol in volumes:
Open commit View diff
44 for vol in volumes:
same change 25636c1

Refactor game and Discord bot logic, remove samples

Full commit hash
25636c1c18b01d13a70d4374737416c3a5acab1e
Author
Alex Carrington <[email protected]>
Date
7 months ago
Selected line
45
                if vol.data_model.name == volume and vol.data_model.location.data_model.id == self.location:
Open commit View diff
45 if vol.data_model.name == volume and vol.data_model.location.data_model.id == self.location:
same change 25636c1

Refactor game and Discord bot logic, remove samples

Full commit hash
25636c1c18b01d13a70d4374737416c3a5acab1e
Author
Alex Carrington <[email protected]>
Date
7 months ago
Selected line
46
                    self.volume = vol.data_model.id
Open commit View diff
46 self.volume = vol.data_model.id
same change 25636c1

Refactor game and Discord bot logic, remove samples

Full commit hash
25636c1c18b01d13a70d4374737416c3a5acab1e
Author
Alex Carrington <[email protected]>
Date
7 months ago
Selected line
47
                    break
Open commit View diff
47 break
same change 25636c1

Refactor game and Discord bot logic, remove samples

Full commit hash
25636c1c18b01d13a70d4374737416c3a5acab1e
Author
Alex Carrington <[email protected]>
Date
7 months ago
Selected line
48
            if self.volume is None:
Open commit View diff
48 if self.volume is None:
same change 25636c1

Refactor game and Discord bot logic, remove samples

Full commit hash
25636c1c18b01d13a70d4374737416c3a5acab1e
Author
Alex Carrington <[email protected]>
Date
7 months ago
Selected line
49
                raise ValueError(f"Volume not found in location {location}: {volume}")
Open commit View diff
49 raise ValueError(f"Volume not found in location {location}: {volume}")
same change 25636c1

Refactor game and Discord bot logic, remove samples

Full commit hash
25636c1c18b01d13a70d4374737416c3a5acab1e
Author
Alex Carrington <[email protected]>
Date
7 months ago
Selected line
50
Open commit View diff
50
same change 25636c1

Refactor game and Discord bot logic, remove samples

Full commit hash
25636c1c18b01d13a70d4374737416c3a5acab1e
Author
Alex Carrington <[email protected]>
Date
7 months ago
Selected line
51
        # --- check for existing server by name ---
Open commit View diff
51 # --- check for existing server by name ---
err0x5dd over 7 years ago d21b0dd

Fuck Windows line seperator

Full commit hash
d21b0ddd348aa6c47c656a723f54a5e1f08deede
Author
err0x5dd <[email protected]>
Date
over 7 years ago
Selected line
52
        servers = self.client.servers.get_all()
Open commit View diff
52 servers = self.client.servers.get_all()
err0x5dd over 7 years ago 94306f0

Fixed different indent

Full commit hash
94306f0678b7ef60a31af6ba36669a31e04fa24a
Author
err0x5dd <[email protected]>
Date
over 7 years ago
Selected line
53
        self.server = None
Open commit View diff
53 self.server = None
Alex Carrington 7 months ago 25636c1

Refactor game and Discord bot logic, remove samples

Full commit hash
25636c1c18b01d13a70d4374737416c3a5acab1e
Author
Alex Carrington <[email protected]>
Date
7 months ago
Selected line
54
        for s in servers:
Open commit View diff
54 for s in servers:
same change 25636c1

Refactor game and Discord bot logic, remove samples

Full commit hash
25636c1c18b01d13a70d4374737416c3a5acab1e
Author
Alex Carrington <[email protected]>
Date
7 months ago
Selected line
55
            if s.data_model.name == name:
Open commit View diff
55 if s.data_model.name == name:
same change 25636c1

Refactor game and Discord bot logic, remove samples

Full commit hash
25636c1c18b01d13a70d4374737416c3a5acab1e
Author
Alex Carrington <[email protected]>
Date
7 months ago
Selected line
56
                self.server = s  # keep the Server object
Open commit View diff
56 self.server = s # keep the Server object
err0x5dd over 7 years ago d21b0dd

Fuck Windows line seperator

Full commit hash
d21b0ddd348aa6c47c656a723f54a5e1f08deede
Author
err0x5dd <[email protected]>
Date
over 7 years ago
Selected line
57
                self.running = True
Open commit View diff
57 self.running = True
same change d21b0dd

Fuck Windows line seperator

Full commit hash
d21b0ddd348aa6c47c656a723f54a5e1f08deede
Author
err0x5dd <[email protected]>
Date
over 7 years ago
Selected line
58
                print("existing server " + self.server.status)
Open commit View diff
58 print("existing server " + self.server.status)
same change d21b0dd

Fuck Windows line seperator

Full commit hash
d21b0ddd348aa6c47c656a723f54a5e1f08deede
Author
err0x5dd <[email protected]>
Date
over 7 years ago
Selected line
59
Open commit View diff
59
err0x5dd about 7 years ago 4a1e1f5

Added location infos and possibly fixed some bugs

Full commit hash
4a1e1f5b44dd695d30018a6f873c5056e0760477
Author
err0x5dd <[email protected]>
Date
about 7 years ago
Selected line
60
    async def start(self):
Open commit View diff
60 async def start(self):
Alex Carrington 7 months ago 25636c1

Refactor game and Discord bot logic, remove samples

Full commit hash
25636c1c18b01d13a70d4374737416c3a5acab1e
Author
Alex Carrington <[email protected]>
Date
7 months ago
Selected line
61
        if not self.running:
Open commit View diff
61 if not self.running:
err0x5dd over 7 years ago d21b0dd

Fuck Windows line seperator

Full commit hash
d21b0ddd348aa6c47c656a723f54a5e1f08deede
Author
err0x5dd <[email protected]>
Date
over 7 years ago
Selected line
62
            print("Starting " + self.name)
Open commit View diff
62 print("Starting " + self.name)
Alex Carrington 7 months ago 25636c1

Refactor game and Discord bot logic, remove samples

Full commit hash
25636c1c18b01d13a70d4374737416c3a5acab1e
Author
Alex Carrington <[email protected]>
Date
7 months ago
Selected line
63
Open commit View diff
63
same change 25636c1

Refactor game and Discord bot logic, remove samples

Full commit hash
25636c1c18b01d13a70d4374737416c3a5acab1e
Author
Alex Carrington <[email protected]>
Date
7 months ago
Selected line
64
            # Choose image:
Open commit View diff
64 # Choose image:
same change 25636c1

Refactor game and Discord bot logic, remove samples

Full commit hash
25636c1c18b01d13a70d4374737416c3a5acab1e
Author
Alex Carrington <[email protected]>
Date
7 months ago
Selected line
65
            # - if snapshot provided => use that snapshot image id
Open commit View diff
65 # - if snapshot provided => use that snapshot image id
same change 25636c1

Refactor game and Discord bot logic, remove samples

Full commit hash
25636c1c18b01d13a70d4374737416c3a5acab1e
Author
Alex Carrington <[email protected]>
Date
7 months ago
Selected line
66
            # - else => boot from Ubuntu 24.04 (Hetzner public image name)
Open commit View diff
66 # - else => boot from Ubuntu 24.04 (Hetzner public image name)
same change 25636c1

Refactor game and Discord bot logic, remove samples

Full commit hash
25636c1c18b01d13a70d4374737416c3a5acab1e
Author
Alex Carrington <[email protected]>
Date
7 months ago
Selected line
67
            image = Image(self.snapshot) if self.snapshot is not None else "ubuntu-24.04"
Open commit View diff
67 image = Image(self.snapshot) if self.snapshot is not None else "ubuntu-24.04"
same change 25636c1

Refactor game and Discord bot logic, remove samples

Full commit hash
25636c1c18b01d13a70d4374737416c3a5acab1e
Author
Alex Carrington <[email protected]>
Date
7 months ago
Selected line
68
Open commit View diff
68
same change 25636c1

Refactor game and Discord bot logic, remove samples

Full commit hash
25636c1c18b01d13a70d4374737416c3a5acab1e
Author
Alex Carrington <[email protected]>
Date
7 months ago
Selected line
69
            # Attach volume only if configured
Open commit View diff
69 # Attach volume only if configured
same change 25636c1

Refactor game and Discord bot logic, remove samples

Full commit hash
25636c1c18b01d13a70d4374737416c3a5acab1e
Author
Alex Carrington <[email protected]>
Date
7 months ago
Selected line
70
            volumes = [Volume(self.volume)] if self.volume is not None else None
Open commit View diff
70 volumes = [Volume(self.volume)] if self.volume is not None else None
same change 25636c1

Refactor game and Discord bot logic, remove samples

Full commit hash
25636c1c18b01d13a70d4374737416c3a5acab1e
Author
Alex Carrington <[email protected]>
Date
7 months ago
Selected line
71
Open commit View diff
71
err0x5dd over 7 years ago d21b0dd

Fuck Windows line seperator

Full commit hash
d21b0ddd348aa6c47c656a723f54a5e1f08deede
Author
err0x5dd <[email protected]>
Date
over 7 years ago
Selected line
72
            response = self.client.servers.create(
Open commit View diff
72 response = self.client.servers.create(
Alex Carrington 7 months ago 25636c1

Refactor game and Discord bot logic, remove samples

Full commit hash
25636c1c18b01d13a70d4374737416c3a5acab1e
Author
Alex Carrington <[email protected]>
Date
7 months ago
Selected line
73
                name=self.name,
Open commit View diff
73 name=self.name,
err0x5dd over 7 years ago d21b0dd

Fuck Windows line seperator

Full commit hash
d21b0ddd348aa6c47c656a723f54a5e1f08deede
Author
err0x5dd <[email protected]>
Date
over 7 years ago
Selected line
74
                server_type=ServerType(name=self.servertype),
Open commit View diff
74 server_type=ServerType(name=self.servertype),
Alex Carrington 7 months ago 25636c1

Refactor game and Discord bot logic, remove samples

Full commit hash
25636c1c18b01d13a70d4374737416c3a5acab1e
Author
Alex Carrington <[email protected]>
Date
7 months ago
Selected line
75
                image=image,
Open commit View diff
75 image=image,
err0x5dd about 7 years ago 4a1e1f5

Added location infos and possibly fixed some bugs

Full commit hash
4a1e1f5b44dd695d30018a6f873c5056e0760477
Author
err0x5dd <[email protected]>
Date
about 7 years ago
Selected line
76
                location=Location(self.location),
Open commit View diff
76 location=Location(self.location),
Alex Carrington 7 months ago 25636c1

Refactor game and Discord bot logic, remove samples

Full commit hash
25636c1c18b01d13a70d4374737416c3a5acab1e
Author
Alex Carrington <[email protected]>
Date
7 months ago
Selected line
77
                volumes=volumes
Open commit View diff
77 volumes=volumes
err0x5dd over 7 years ago d21b0dd

Fuck Windows line seperator

Full commit hash
d21b0ddd348aa6c47c656a723f54a5e1f08deede
Author
err0x5dd <[email protected]>
Date
over 7 years ago
Selected line
78
            )
Open commit View diff
78 )
Alex Carrington 7 months ago 25636c1

Refactor game and Discord bot logic, remove samples

Full commit hash
25636c1c18b01d13a70d4374737416c3a5acab1e
Author
Alex Carrington <[email protected]>
Date
7 months ago
Selected line
79
            self.server = response.server
Open commit View diff
79 self.server = response.server
err0x5dd over 7 years ago f53003d

Fixed some error to hopefully prevent a crash

Full commit hash
f53003db7e3d8e38a134dd36fb831ccec971f9b1
Author
err0x5dd <[email protected]>
Date
over 7 years ago
Selected line
80
            self.running = True
Open commit View diff
80 self.running = True
err0x5dd over 7 years ago d21b0dd

Fuck Windows line seperator

Full commit hash
d21b0ddd348aa6c47c656a723f54a5e1f08deede
Author
err0x5dd <[email protected]>
Date
over 7 years ago
Selected line
81
        else:
Open commit View diff
81 else:
same change d21b0dd

Fuck Windows line seperator

Full commit hash
d21b0ddd348aa6c47c656a723f54a5e1f08deede
Author
err0x5dd <[email protected]>
Date
over 7 years ago
Selected line
82
            print(self.name + " is already running")
Open commit View diff
82 print(self.name + " is already running")
same change d21b0dd

Fuck Windows line seperator

Full commit hash
d21b0ddd348aa6c47c656a723f54a5e1f08deede
Author
err0x5dd <[email protected]>
Date
over 7 years ago
Selected line
83
Open commit View diff
83
err0x5dd about 7 years ago 4a1e1f5

Added location infos and possibly fixed some bugs

Full commit hash
4a1e1f5b44dd695d30018a6f873c5056e0760477
Author
err0x5dd <[email protected]>
Date
about 7 years ago
Selected line
84
    async def stop(self):
Open commit View diff
84 async def stop(self):
Alex Carrington 7 months ago 25636c1

Refactor game and Discord bot logic, remove samples

Full commit hash
25636c1c18b01d13a70d4374737416c3a5acab1e
Author
Alex Carrington <[email protected]>
Date
7 months ago
Selected line
85
        if self.running:
Open commit View diff
85 if self.running:
err0x5dd over 7 years ago d21b0dd

Fuck Windows line seperator

Full commit hash
d21b0ddd348aa6c47c656a723f54a5e1f08deede
Author
err0x5dd <[email protected]>
Date
over 7 years ago
Selected line
86
            print("Stopping " + self.name)
Open commit View diff
86 print("Stopping " + self.name)
Alex Carrington 7 months ago 25636c1

Refactor game and Discord bot logic, remove samples

Full commit hash
25636c1c18b01d13a70d4374737416c3a5acab1e
Author
Alex Carrington <[email protected]>
Date
7 months ago
Selected line
87
Open commit View diff
87
err0x5dd over 7 years ago d21b0dd

Fuck Windows line seperator

Full commit hash
d21b0ddd348aa6c47c656a723f54a5e1f08deede
Author
err0x5dd <[email protected]>
Date
over 7 years ago
Selected line
88
            self.client.servers.shutdown(self.server)
Open commit View diff
88 self.client.servers.shutdown(self.server)
Alex Carrington 7 months ago 25636c1

Refactor game and Discord bot logic, remove samples

Full commit hash
25636c1c18b01d13a70d4374737416c3a5acab1e
Author
Alex Carrington <[email protected]>
Date
7 months ago
Selected line
89
Open commit View diff
89
same change 25636c1

Refactor game and Discord bot logic, remove samples

Full commit hash
25636c1c18b01d13a70d4374737416c3a5acab1e
Author
Alex Carrington <[email protected]>
Date
7 months ago
Selected line
90
            # Give it time to begin shutdown, then poll status
Open commit View diff
90 # Give it time to begin shutdown, then poll status
same change 25636c1

Refactor game and Discord bot logic, remove samples

Full commit hash
25636c1c18b01d13a70d4374737416c3a5acab1e
Author
Alex Carrington <[email protected]>
Date
7 months ago
Selected line
91
            await asyncio.sleep(5)
Open commit View diff
91 await asyncio.sleep(5)
same change 25636c1

Refactor game and Discord bot logic, remove samples

Full commit hash
25636c1c18b01d13a70d4374737416c3a5acab1e
Author
Alex Carrington <[email protected]>
Date
7 months ago
Selected line
92
Open commit View diff
92
same change 25636c1

Refactor game and Discord bot logic, remove samples

Full commit hash
25636c1c18b01d13a70d4374737416c3a5acab1e
Author
Alex Carrington <[email protected]>
Date
7 months ago
Selected line
93
            while True:
Open commit View diff
93 while True:
err0x5dd over 7 years ago d21b0dd

Fuck Windows line seperator

Full commit hash
d21b0ddd348aa6c47c656a723f54a5e1f08deede
Author
err0x5dd <[email protected]>
Date
over 7 years ago
Selected line
94
                serv = self.client.servers.get_by_id(self.server.id)
Open commit View diff
94 serv = self.client.servers.get_by_id(self.server.id)
same change d21b0dd

Fuck Windows line seperator

Full commit hash
d21b0ddd348aa6c47c656a723f54a5e1f08deede
Author
err0x5dd <[email protected]>
Date
over 7 years ago
Selected line
95
                self.server = serv
Open commit View diff
95 self.server = serv
Alex Carrington 7 months ago 25636c1

Refactor game and Discord bot logic, remove samples

Full commit hash
25636c1c18b01d13a70d4374737416c3a5acab1e
Author
Alex Carrington <[email protected]>
Date
7 months ago
Selected line
96
                print(self.server.status)
Open commit View diff
96 print(self.server.status)
same change 25636c1

Refactor game and Discord bot logic, remove samples

Full commit hash
25636c1c18b01d13a70d4374737416c3a5acab1e
Author
Alex Carrington <[email protected]>
Date
7 months ago
Selected line
97
                if self.server.status == Server.STATUS_OFF:
Open commit View diff
97 if self.server.status == Server.STATUS_OFF:
same change 25636c1

Refactor game and Discord bot logic, remove samples

Full commit hash
25636c1c18b01d13a70d4374737416c3a5acab1e
Author
Alex Carrington <[email protected]>
Date
7 months ago
Selected line
98
                    break
Open commit View diff
98 break
same change 25636c1

Refactor game and Discord bot logic, remove samples

Full commit hash
25636c1c18b01d13a70d4374737416c3a5acab1e
Author
Alex Carrington <[email protected]>
Date
7 months ago
Selected line
99
                await asyncio.sleep(5)
Open commit View diff
99 await asyncio.sleep(5)
same change 25636c1

Refactor game and Discord bot logic, remove samples

Full commit hash
25636c1c18b01d13a70d4374737416c3a5acab1e
Author
Alex Carrington <[email protected]>
Date
7 months ago
Selected line
100
Open commit View diff
100
err0x5dd over 7 years ago d21b0dd

Fuck Windows line seperator

Full commit hash
d21b0ddd348aa6c47c656a723f54a5e1f08deede
Author
err0x5dd <[email protected]>
Date
over 7 years ago
Selected line
101
            print("Server is now stopped")
Open commit View diff
101 print("Server is now stopped")
Alex Carrington 7 months ago 25636c1

Refactor game and Discord bot logic, remove samples

Full commit hash
25636c1c18b01d13a70d4374737416c3a5acab1e
Author
Alex Carrington <[email protected]>
Date
7 months ago
Selected line
102
Open commit View diff
102
same change 25636c1

Refactor game and Discord bot logic, remove samples

Full commit hash
25636c1c18b01d13a70d4374737416c3a5acab1e
Author
Alex Carrington <[email protected]>
Date
7 months ago
Selected line
103
            # Detach volume only if configured
Open commit View diff
103 # Detach volume only if configured
same change 25636c1

Refactor game and Discord bot logic, remove samples

Full commit hash
25636c1c18b01d13a70d4374737416c3a5acab1e
Author
Alex Carrington <[email protected]>
Date
7 months ago
Selected line
104
            if self.volume is not None:
Open commit View diff
104 if self.volume is not None:
same change 25636c1

Refactor game and Discord bot logic, remove samples

Full commit hash
25636c1c18b01d13a70d4374737416c3a5acab1e
Author
Alex Carrington <[email protected]>
Date
7 months ago
Selected line
105
                self.client.volumes.detach(Volume(self.volume))
Open commit View diff
105 self.client.volumes.detach(Volume(self.volume))
same change 25636c1

Refactor game and Discord bot logic, remove samples

Full commit hash
25636c1c18b01d13a70d4374737416c3a5acab1e
Author
Alex Carrington <[email protected]>
Date
7 months ago
Selected line
106
                await asyncio.sleep(1)
Open commit View diff
106 await asyncio.sleep(1)
same change 25636c1

Refactor game and Discord bot logic, remove samples

Full commit hash
25636c1c18b01d13a70d4374737416c3a5acab1e
Author
Alex Carrington <[email protected]>
Date
7 months ago
Selected line
107
Open commit View diff
107
err0x5dd over 7 years ago d21b0dd

Fuck Windows line seperator

Full commit hash
d21b0ddd348aa6c47c656a723f54a5e1f08deede
Author
err0x5dd <[email protected]>
Date
over 7 years ago
Selected line
108
            self.client.servers.delete(self.server)
Open commit View diff
108 self.client.servers.delete(self.server)
same change d21b0dd

Fuck Windows line seperator

Full commit hash
d21b0ddd348aa6c47c656a723f54a5e1f08deede
Author
err0x5dd <[email protected]>
Date
over 7 years ago
Selected line
109
            self.running = False
Open commit View diff
109 self.running = False
err0x5dd over 7 years ago 94306f0

Fixed different indent

Full commit hash
94306f0678b7ef60a31af6ba36669a31e04fa24a
Author
err0x5dd <[email protected]>
Date
over 7 years ago
Selected line
110
            self.server = None
Open commit View diff
110 self.server = None
err0x5dd over 7 years ago d21b0dd

Fuck Windows line seperator

Full commit hash
d21b0ddd348aa6c47c656a723f54a5e1f08deede
Author
err0x5dd <[email protected]>
Date
over 7 years ago
Selected line
111
        else:
Open commit View diff
111 else:
same change d21b0dd

Fuck Windows line seperator

Full commit hash
d21b0ddd348aa6c47c656a723f54a5e1f08deede
Author
err0x5dd <[email protected]>
Date
over 7 years ago
Selected line
112
            print(self.name + " isn't running")
Open commit View diff
112 print(self.name + " isn't running")
same change d21b0dd

Fuck Windows line seperator

Full commit hash
d21b0ddd348aa6c47c656a723f54a5e1f08deede
Author
err0x5dd <[email protected]>
Date
over 7 years ago
Selected line
113
Open commit View diff
113
same change d21b0dd

Fuck Windows line seperator

Full commit hash
d21b0ddd348aa6c47c656a723f54a5e1f08deede
Author
err0x5dd <[email protected]>
Date
over 7 years ago
Selected line
114
    def status(self):
Open commit View diff
114 def status(self):
same change d21b0dd

Fuck Windows line seperator

Full commit hash
d21b0ddd348aa6c47c656a723f54a5e1f08deede
Author
err0x5dd <[email protected]>
Date
over 7 years ago
Selected line
115
        msg = self.name
Open commit View diff
115 msg = self.name
Alex Carrington 7 months ago 25636c1

Refactor game and Discord bot logic, remove samples

Full commit hash
25636c1c18b01d13a70d4374737416c3a5acab1e
Author
Alex Carrington <[email protected]>
Date
7 months ago
Selected line
116
        if self.server is None:
Open commit View diff
116 if self.server is None:
err0x5dd over 7 years ago 94306f0

Fixed different indent

Full commit hash
94306f0678b7ef60a31af6ba36669a31e04fa24a
Author
err0x5dd <[email protected]>
Date
over 7 years ago
Selected line
117
            msg += " isn't running"
Open commit View diff
117 msg += " isn't running"
err0x5dd over 7 years ago f53003d

Fixed some error to hopefully prevent a crash

Full commit hash
f53003db7e3d8e38a134dd36fb831ccec971f9b1
Author
err0x5dd <[email protected]>
Date
over 7 years ago
Selected line
118
        else:
Open commit View diff
118 else:
same change f53003d

Fixed some error to hopefully prevent a crash

Full commit hash
f53003db7e3d8e38a134dd36fb831ccec971f9b1
Author
err0x5dd <[email protected]>
Date
over 7 years ago
Selected line
119
            self.server = self.client.servers.get_by_id(self.server.id)
Open commit View diff
119 self.server = self.client.servers.get_by_id(self.server.id)
same change f53003d

Fixed some error to hopefully prevent a crash

Full commit hash
f53003db7e3d8e38a134dd36fb831ccec971f9b1
Author
err0x5dd <[email protected]>
Date
over 7 years ago
Selected line
120
            msg += " is in status "
Open commit View diff
120 msg += " is in status "
same change f53003d

Fixed some error to hopefully prevent a crash

Full commit hash
f53003db7e3d8e38a134dd36fb831ccec971f9b1
Author
err0x5dd <[email protected]>
Date
over 7 years ago
Selected line
121
            msg += self.server.status
Open commit View diff
121 msg += self.server.status
same change f53003d

Fixed some error to hopefully prevent a crash

Full commit hash
f53003db7e3d8e38a134dd36fb831ccec971f9b1
Author
err0x5dd <[email protected]>
Date
over 7 years ago
Selected line
122
            msg += "\n"
Open commit View diff
122 msg += "\n"
same change f53003d

Fixed some error to hopefully prevent a crash

Full commit hash
f53003db7e3d8e38a134dd36fb831ccec971f9b1
Author
err0x5dd <[email protected]>
Date
over 7 years ago
Selected line
123
            msg += "and has the IP:\n"
Open commit View diff
123 msg += "and has the IP:\n"
err0x5dd over 7 years ago d21b0dd

Fuck Windows line seperator

Full commit hash
d21b0ddd348aa6c47c656a723f54a5e1f08deede
Author
err0x5dd <[email protected]>
Date
over 7 years ago
Selected line
124
            ip = self.server.public_net.ipv4.ip
Open commit View diff
124 ip = self.server.public_net.ipv4.ip
same change d21b0dd

Fuck Windows line seperator

Full commit hash
d21b0ddd348aa6c47c656a723f54a5e1f08deede
Author
err0x5dd <[email protected]>
Date
over 7 years ago
Selected line
125
            msg += ip + "\n"
Open commit View diff
125 msg += ip + "\n"
same change d21b0dd

Fuck Windows line seperator

Full commit hash
d21b0ddd348aa6c47c656a723f54a5e1f08deede
Author
err0x5dd <[email protected]>
Date
over 7 years ago
Selected line
126
        return msg
Open commit View diff
126 return msg
same change d21b0dd

Fuck Windows line seperator

Full commit hash
d21b0ddd348aa6c47c656a723f54a5e1f08deede
Author
err0x5dd <[email protected]>
Date
over 7 years ago
Selected line
127
Open commit View diff
127
same change d21b0dd

Fuck Windows line seperator

Full commit hash
d21b0ddd348aa6c47c656a723f54a5e1f08deede
Author
err0x5dd <[email protected]>
Date
over 7 years ago
Selected line
128
    def isRunning(self):
Open commit View diff
128 def isRunning(self):
Alex Carrington 7 months ago 25636c1

Refactor game and Discord bot logic, remove samples

Full commit hash
25636c1c18b01d13a70d4374737416c3a5acab1e
Author
Alex Carrington <[email protected]>
Date
7 months ago
Selected line
129
        return self.running
Open commit View diff
129 return self.running