Explorar el Código

For some reason all the files need to be commited again. Done some small work here and there. moving files around and starting making the output nicer for selfassing.py

tags/v1.0.0
roxie hace 6 años
padre
commit
722d2b92db
Se han modificado 11 ficheros con 12 adiciones y 11 borrados
  1. +0
    -0
      checks.py
  2. +5
    -4
      cogs/selfassign.py
  3. +0
    -0
      config/__init__.py
  4. +0
    -0
      config/cogs.py
  5. +0
    -0
      config/meta.py
  6. +0
    -0
      config/server_config.py
  7. +1
    -1
      config/servers.json
  8. +1
    -1
      config/settings.py
  9. +0
    -0
      load_config.py
  10. +5
    -5
      main.py
  11. +0
    -0
      settings/preferences_example.ini

+ 0
- 0
checks.py Ver fichero


+ 5
- 4
cogs/selfassign.py Ver fichero

@@ -1,8 +1,9 @@
import discord
from discord.ext import commands

from server_config import ServerConfig
import checks
from config.server_config import ServerConfig


class SelfAssign():
def __init__(self, Bot):
@@ -17,12 +18,12 @@ class SelfAssign():
Usage:
{command_prefix}listroles
"""
roles = []
roles = " "
for role in self.servers[ctx.message.server.id]["selfAssign"]["roles"]:
for serverrole in ctx.message.server.roles:
if role == serverrole.id:
roles.append(serverrole.name)
return await self.bot.say(str(roles).strip("[]"))
roles.join(serverrole.name)
return await self.bot.say(roles)

@commands.command(pass_context=True)
async def iam(self, ctx, role: discord.Role = None):

+ 0
- 0
config/__init__.py Ver fichero


+ 0
- 0
config/cogs.py Ver fichero


+ 0
- 0
config/meta.py Ver fichero


server_config.py → config/server_config.py Ver fichero


+ 1
- 1
config/servers.json Ver fichero

@@ -1 +1 @@
{"304048071963312130": {"greets": {"enabled": 0, "welcome-channel": "", "member-role": "", "custom-message": "", "default-message": "Be sure to read the rules."}, "goodbyes": {"enabled": 0, "goodbye-channel": ""}, "selfAssign": {"enabled": 0, "roles": ["307330606348632064", "308081570059649024"]}, "twitch": {"enabled": 0, "twitch-channel": "", "whitelist": {"enabled": 0, "list": []}}, "mute": {"role": "", "admin-role": []}}}
{"304048071963312130": {"greets": {"enabled": 0, "welcome-channel": "", "member-role": "", "custom-message": "", "default-message": "Be sure to read the rules."}, "goodbyes": {"enabled": 0, "goodbye-channel": ""}, "selfAssign": {"enabled": 0, "roles": ["307330606348632064", "308081570059649024", "308081662787321861"]}, "twitch": {"enabled": 0, "twitch-channel": "", "whitelist": {"enabled": 0, "list": []}}, "mute": {"role": "", "admin-role": []}}}

+ 1
- 1
config/settings.py Ver fichero

@@ -1,7 +1,7 @@
import configparser

settings = configparser.ConfigParser()
settings.read("config/preferences.ini")
settings.read("settings/preferences.ini")

command_prefix = settings["Roxbot"]["Command_Prefix"]
token = settings["Roxbot"]["Token"]

+ 0
- 0
load_config.py Ver fichero


+ 5
- 5
main.py Ver fichero

@@ -1,11 +1,11 @@
#!/usr/env python
import logging
import datetime
import discord
from discord.ext import commands

from server_config import ServerConfig
import load_config
from config.server_config import ServerConfig

# Sets up Logging that discord.py does on its own
logger = logging.getLogger('discord')
@@ -63,9 +63,9 @@ async def on_message(message):
return await bot.process_commands(message)


@bot.event
async def on_error(error, ctx):
pass
#@bot.event
#async def on_error(error, ctx, *args, **kwargs):
# pass


@bot.event

config/preferences_example.ini → settings/preferences_example.ini Ver fichero


Cargando…
Cancelar
Guardar