Преглед на файлове

Printsettings command made

tags/v0.4.0
roxie преди 7 години
родител
ревизия
25c08d185b
променени са 3 файла, в които са добавени 13 реда и са изтрити 3 реда
  1. +1
    -1
      README.md
  2. +11
    -1
      cogs/Admin.py
  3. +1
    -1
      main.py

+ 1
- 1
README.md Целия файл

@@ -22,7 +22,7 @@ A simple Discord Bot used by me personally, written for fun.
A list I just dump ideas on or planned bug fixes so that I can keep track.

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

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

+ 11
- 1
cogs/Admin.py Целия файл

@@ -1,5 +1,6 @@
import os
import sys
import json
import aiohttp
import asyncio

@@ -95,8 +96,17 @@ class Admin():
else:
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)
async def set_welcomechannel(self, ctx, channel: discord.Channel = None):
if not owner(ctx):

+ 1
- 1
main.py Целия файл

@@ -8,7 +8,7 @@ from discord.ext.commands import Bot
from config.config import Config
from cogs import cogs

__version__ = '0.3.5'
__version__ = '0.3.6'

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

Loading…
Отказ
Запис