start new:
tmux
start new with session name:
tmux new -s myname
rsync (Everyone seems to like -z, but it is much slower for me)
#!/usr/bin/python | |
from sys import argv | |
import httplib2 | |
import simplejson as json | |
#API_KEY = ADD YOUR API KEY HERE , even if you don't shurl will still work | |
def shurl(longUrl): | |
#!/bin/bash | |
# | |
BACKUPDEST="$1" | |
DOMAIN="$2" | |
MAXBACKUPS="$3" | |
if [ -z "$BACKUPDEST" -o -z "$DOMAIN" ]; then | |
echo "Usage: ./vm-backup <backup-folder> <domain> [max-backups]" | |
exit 1 |
""" | |
If you are not using this inside a cog, add the event decorator e.g: | |
@bot.event | |
async def on_command_error(ctx, error) | |
For examples of cogs see: | |
https://gist.github.com/EvieePy/d78c061a4798ae81be9825468fe146be | |
For a list of exceptions: | |
https://discordpy.readthedocs.io/en/latest/ext/commands/api.html#exceptions |