Selaa lähdekoodia

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 6 vuotta sitten
vanhempi
commit
722d2b92db
11 muutettua tiedostoa jossa 12 lisäystä ja 11 poistoa
  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 Näytä tiedosto


+ 5
- 4
cogs/selfassign.py Näytä tiedosto

@@ -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 Näytä tiedosto


+ 0
- 0
config/cogs.py Näytä tiedosto


+ 0
- 0
config/meta.py Näytä tiedosto


server_config.py → config/server_config.py Näytä tiedosto


+ 1
- 1
config/servers.json Näytä tiedosto

@@ -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 Näytä tiedosto

@@ -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 Näytä tiedosto


+ 5
- 5
main.py Näytä tiedosto

@@ -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 Näytä tiedosto


Loading…
Peruuta
Tallenna