# # All rights reserved. import asyncio from time import time from git import Repo from git.exc import GitCommandError from petercord import Config, Message, petercord, pool LOG = petercord.getLogger(__name__) CHANNEL = petercord.getCLogger(__name__) @petercord.on_cmd( "update", about={ "header": "Check Updates or Update Petercord", "flags": { "-pull": "pull updates", "-push": "push updates to heroku", "-master": "select master branch", "-beta": "select beta branch", }, "petercord": "{tr}update : check updates from master branch\n" "{tr}update -[branch_name] : check updates from any branch\n" "add -pull if you want to pull updates\n" "add -push if you want to push updates to heroku",
import os from datetime import datetime as dt from pytz import timezone from petercord import petercord, Message LOG = petercord.getLogger(__name__) # logger object COUNTRY_CITY = os.environ.get("COUNTRY_CITY", None) @petercord.on_cmd( "dt", about={ 'header': "Get the time and date of a City/Country/Timezone.", 'flags': { '-l': "Gives list of all Country/City Combos for Heroku Config" }, 'petercord': "Use {tr}dt to show the Time & Date of your predefined City\n" "Use {tr}dt -l to display all TZ Combo's for the Config\n", 'examples': ['{tr}dt', '{tr}dt [Flag]'] }, del_pre=True) async def grabTime(message: Message): LOG.info("Starting Time command...") defaultMessage = ( "<code>Below is a list of all the Timezones Avaliable</code> \n<a " "href=https://pastebin.com/raw/0KSh9CMj>Click Here!</a>\n<code>Enter" " one in your Heroku Config Under</code> (<code>COUNTRY_CITY</code>)\n" "<code>Ex: America/Los_Angeles</code>")