Procházet zdrojové kódy

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 před 6 roky
rodič
revize
722d2b92db
11 změnil soubory, kde provedl 12 přidání a 11 odebrání
  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 Zobrazit soubor


+ 5
- 4
cogs/selfassign.py Zobrazit soubor

@@ -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 Zobrazit soubor


+ 0
- 0
config/cogs.py Zobrazit soubor


+ 0
- 0
config/meta.py Zobrazit soubor


server_config.py → config/server_config.py Zobrazit soubor


+ 1
- 1
config/servers.json Zobrazit soubor

@@ -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 Zobrazit soubor

@@ -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 Zobrazit soubor


+ 5
- 5
main.py Zobrazit soubor

@@ -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 Zobrazit soubor


Načítá se…
Zrušit
Uložit