Add remaining seconds of cooldown to cooldown message
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import json
|
||||
import os
|
||||
from typing import Optional
|
||||
from typing import Optional, Any
|
||||
|
||||
CONFIG = 'data/config.json'
|
||||
config: dict = {
|
||||
@@ -60,13 +60,15 @@ def config_save():
|
||||
json.dump(config, config_file)
|
||||
|
||||
|
||||
def config_get(key: str, guild: Optional[int] = None):
|
||||
def config_get(key: str, guild: Optional[int] = None) -> Optional[Any]:
|
||||
if guild is None:
|
||||
return config[key]
|
||||
guild = _get_guild_config(guild)
|
||||
if key in guild:
|
||||
return guild[key]
|
||||
return config[key]
|
||||
if key in config:
|
||||
return config[key]
|
||||
return None
|
||||
|
||||
|
||||
def config_set(key: str, value, guild: Optional[int] = None) -> str:
|
||||
|
||||
Reference in New Issue
Block a user