Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Alias #1

Open
haxxus opened this issue Jan 5, 2019 · 5 comments
Open

Alias #1

haxxus opened this issue Jan 5, 2019 · 5 comments

Comments

@haxxus
Copy link

haxxus commented Jan 5, 2019

Hello, i was able to set this bot on our discord and was wondering how to create alias for a server ?

@andreagiavatto
Copy link
Owner

Hello there! It is fairly easy, replace the dictionary named aliases with something like

aliases = {
    'alias1': 'ip_address',
    'alias2': 'hostname'
}

where alias1 and alias2 are the shortcuts you want to use in your discord channel (like !q3 alias1). For example this is a valid dictionary:

aliases = {
    'ctf': 'ctf.q3msk.ru:50000',
    'unfreeze': '85.10.203.89:27964',
    'duel': '88.198.221.98'
}

The bot recognises both IPs and hostnames (using a dns resolver) and when not specified it will query the server on the default port 27960. In the example above, it will print this output

screenshot 2019-01-05 at 23 50 52

@haxxus
Copy link
Author

haxxus commented Jan 6, 2019

Great! i thought it was from within discord, giving the bot the command to save an alias. The only other issue im seeing is that is not formatting the table like in your screenshot, this is how it looks on our end:
excessiveplus - discord_9

@andreagiavatto
Copy link
Owner

@haxxus try resizing your client's window to allow more space horizontally ;-)

@haxxus
Copy link
Author

haxxus commented Jan 6, 2019

umm, i use 2560 / 1440 resolution, even at full screen doesnt seem to show like yours
excessiveplus - discord_10

@haxxus
Copy link
Author

haxxus commented Jan 6, 2019

our discord in case your interested :) https://discord.gg/bZp5Tuy

seems is related to our long names, works fine on other servers

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants