Browse Source

Printsettings command made

tags/v0.4.0
roxie 7 years ago
parent
commit
25c08d185b
3 changed files with 13 additions and 3 deletions
  1. +1
    -1
      README.md
  2. +11
    -1
      cogs/Admin.py
  3. +1
    -1
      main.py

+ 1
- 1
README.md View File

A list I just dump ideas on or planned bug fixes so that I can keep track. A list I just dump ideas on or planned bug fixes so that I can keep track.


#### High Priority #### High Priority
- Create print settings command
- ~~Create print settings command~~


#### Mid Priority #### Mid Priority
- Make the code cleaner so that it isn't eye cancer - Make the code cleaner so that it isn't eye cancer

+ 11
- 1
cogs/Admin.py View File

import os import os
import sys import sys
import json
import aiohttp import aiohttp
import asyncio import asyncio


else: else:
return await self.bot.say("That module dont exist fam. You made the thing") return await self.bot.say("That module dont exist fam. You made the thing")


# TODO: Combine all set commands into one
@bot.command(pass_context=True)
async def printsettings(self, ctx, setting=None):
if not owner(ctx):
return await self.bot.reply(self.con.no_perms_reponse, delete_after=self.con.delete_after)
else:
config = self.serverconfig[ctx.message.server.id]
if setting in config:
config = config[setting]
return await self.bot.say(str(json.dumps(config, indent=4)))


# TODO: Combine all set commands into one
@bot.command(pass_context=True, hidden=True) @bot.command(pass_context=True, hidden=True)
async def set_welcomechannel(self, ctx, channel: discord.Channel = None): async def set_welcomechannel(self, ctx, channel: discord.Channel = None):
if not owner(ctx): if not owner(ctx):

+ 1
- 1
main.py View File

from config.config import Config from config.config import Config
from cogs import cogs from cogs import cogs


__version__ = '0.3.5'
__version__ = '0.3.6'


settings = configparser.ConfigParser() settings = configparser.ConfigParser()
settings.read('config/settings.ini') settings.read('config/settings.ini')

Loading…
Cancel
Save