tuxbot-bot/cogs/utils/config.py
Romain J 97980e96d1 feat(command|prefix): add prefix commands (new, del, list)
known issue: `prefix list` return weird result when there is no custom prefix
2019-12-17 22:41:54 +01:00

15 lines
305 B
Python

import configparser
class Config(configparser.RawConfigParser):
__slots__ = ('name', '_db')
def __init__(self, name):
super().__init__()
self.name = name
self._db = super()
self._db.read(self.name)
def all(self) -> list:
return self._db.sections()