Skip to content
Permalink
Browse files

GitHub pages

General fixes
  • Loading branch information
BuildTools
BuildTools committed Aug 25, 2019
1 parent a9ff05b commit 5004ed2f4bb4f081b7aeb600ff0e7e42a745a53a
Showing with 32 additions and 66 deletions.
  1. +1 −0 .codacy.yml
  2. +14 −18 .github/README.md
  3. +3 −1 .gitignore
  4. +0 −30 .travis.yml
  5. +6 −0 docs/index.html
  6. +3 −3 docs/js/custom.js
  7. +1 −1 extensions/settings.py
  8. +3 −3 extensions/songs.py
  9. +0 −9 extensions/utility.py
  10. +1 −1 library/converters.py
@@ -3,4 +3,5 @@ exclude_paths:
- Dockerfile
- "data/**"
- "docs/**"
- ".github/**"
- "**/*.yml"
@@ -1,8 +1,7 @@
# Shiro.py - Work in progress
[![Codacy Badge](https://api.codacy.com/project/badge/Grade/d668927a72f14c19b23ca9a0ed71fb20)](https://www.codacy.com/app/MrSpinne/Shiro.py?utm_source=github.com&utm_medium=referral&utm_content=MrSpinne/Shiro.py&utm_campaign=Badge_Grade)
[![Codacy Badge](https://api.codacy.com/project/badge/Coverage/d668927a72f14c19b23ca9a0ed71fb20)](https://www.codacy.com/app/MrSpinne/Shiro.py?utm_source=github.com&utm_medium=referral&utm_content=MrSpinne/Shiro.py&utm_campaign=Badge_Coverage)
[![Build Status](https://travis-ci.org/MrSpinne/Shiro.py.svg?branch=master)](https://travis-ci.org/MrSpinne/Shiro.py)
[![Crowdin](https://badges.crowdin.net/shiro-py/localized.svg)](https://crowdin.com/project/shiro-py)
[![Crowdin](https://badges.crowdin.net/shiro-py/localized.svg)](https://translate.shiro.pro)

![Python Version](https://img.shields.io/badge/python-3.7-blue)
![Bot Version](https://img.shields.io/badge/version-1.3-orange)
@@ -13,22 +12,22 @@ Want to guess anime openings with your friends?
Get Shiro to play song quizzes and enhance your guild with fun related anime features!

## Table of Contents
* [Setup](#setup)
* [Docker](#docker)
* [Postgres Database](#postgres-database)
* [Lavalink Server](#lavalink-server)
* [Shiro](#shiro)
* [Watchtower](#watchtower)
* [Setup](#setup)
* [Docker](#docker)
* [Postgres Database](#postgres-database)
* [Lavalink Server](#lavalink-server)
* [Shiro](#shiro)
* [Watchtower](#watchtower)

* [Configuration](#configuration)
* [Config options](#config-options)
* [Environmental Variables](#environmental-variables)
* [Configuration](#configuration)
* [Config options](#config-options)
* [Environmental Variables](#environmental-variables)

* [Contribute](#contribute)
* [Contribute](#contribute)

* [Links](#links)
* [Links](#links)

* [Bot lists](#bot-lists)
* [Bot lists](#bot-lists)

## Setup
The following setup is done with **docker on debian**. If you're using another os, it may variate a bit.
@@ -115,10 +114,7 @@ Example envs: `DISCORD_TOKEN`, `POSTGRES_HOST`, `POSTGRES_PORT`, `LAVALINK_PASSW
I'd like to hear your thoughts about the whole project. It's far from perfect so feel free to contribute.

## Links
* [Website](https://shiro.pro)
* [Support Server](https://discord.gg/5z4z8kh)
* [Discord Bots](https://discordbots.org/bot/593116701281746955)
* [Invite Bot](https://discordapp.com/oauth2/authorize?client_id=593116701281746955&permissions=3238976&scope=bot)
All important links can be found on the landing page at https://shiro.pro.

## Bot lists
Below are all bot lists, Shiro is currently on. (Only lists with widget shown)
@@ -1,4 +1,6 @@
/.idea/
/tools/
/.coverage
/coverage.xml
/coverage.xml
**/*.mo
**/*.po
@@ -1,35 +1,5 @@
jobs:
include:
- stage: test coverage
env:
- POSTGRES_HOST=localhost
- POSTGRES_PORT=5432
- POSTGRES_DATABASE=shiro
- POSTGRES_USER=shiro
- POSTGRES_PASSWORD=shiro
- LAVALINK_PORT=2333
- LAVALINK_REGION=eu
- TESTS_TEXT_CHANNEL=601501432801263674
- TESTS_VOICE_CHANNEL=601521902439104533
- secure: wGK5i30+b7NxoVPPS4Uid941wEE3cPFDwhbKSeQON8rbSDRMwFl1YEzfWddMOAeyYnpsat/O1v4s1+6xUuo/zqv0CcxkKoqJ596qP0o3l6hB9brCPEl/ZQEOjA+ylxpdX4Xd6nz8lXzej/9O6lhz7PdmgYCdxFSbjkuANX6/Z3HXmMfBq1JwGT401IoE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pVxbU9n3/xWT2DqTi0E+m3OfEyUab3d5ZmjnRHlGGMyFB7UwpTMz6fbXNF2fEE+EaDI6DujOHfj8hhDhczClzyBlnf3ux4D75L4xBIU5qnp4MC933+JpIdUaLipj6CTPc9g0dxeMl1cRAyfBWDlxm+k64TmVHxLQ9hUv4Mdd8Hh25hmoHeXJF3xkWogu3WIozx4IA3TWy3cMjCEqn2gDSCeGC50NNQACDDQfVi3V0lqO895VY6yLR//9FHJQ2GzeQ+TXQIWRF9OXXReTdZyiNscsh3Q1OzScvV6ottSfpi8xfBghsYyA3194NsR5cMH/c1nYiWM+PEdMtLhF9TA8RJ+1KOb/1Qxm89evRQfe8YoeqAB2wWY2M=
dist: xenial
language: python
python: "3.7"
services: postgresql
before_install:
- pip install coverage
- pip install codacy-coverage
before_script:
- psql -c "create database $POSTGRES_DATABASE;" -U postgres
- psql -c "create user $POSTGRES_USER with password '$POSTGRES_PASSWORD';" -U postgres
script:
- coverage run shiro.py
after_success:
- coverage xml
- python-codacy-coverage -r coverage.xml
- stage: build docker image
env:
- DOCKER_USERNAME=mrspinne
@@ -93,6 +93,9 @@
<a href="https://wiki.shiro.pro" target="_blank" class="navbar-item">
Wiki
</a>
<a href="mailto:contact@shiro.pro" target="_blank" class="navbar-item">
Mail
</a>
</div>
</div>
<a href="https://invite.shiro.pro" target="_blank" class="navbar-item">
@@ -162,6 +165,9 @@
<a href="https://wiki.shiro.pro" target="_blank" class="navbar-item">
Wiki
</a>
<a href="mailto:contact@shiro.pro" target="_blank" class="navbar-item">
Mail
</a>
</div>
</div>
<a href="https://invite.shiro.pro" target="_blank" class="navbar-item">
@@ -12,8 +12,8 @@ window.onload = function () {
} else if (params.get("error")) {
clearUrl();
description = "";
if (params.get("description")) {
description = params.get("description") + ". ";
if (params.get("error_description")) {
description = params.get("error_description") + ". ";
}
Swal.fire({
title: "Invitation failed!",
@@ -29,7 +29,7 @@ window.onload = function () {
var win = window.open("https://support.shiro.pro", "_blank");
win.focus();
Swal.fire({
title: "You have joined!",
title: "You have been invited!",
text: "Start talking to others. Ask your questions if you have any.",
type: "success",
confirmButtonText: "Okay",
@@ -13,7 +13,7 @@ def __init__(self, shiro):
@commands.command(aliases=["setprefix"])
@commands.check(checks.is_guild_admin)
async def prefix(self, ctx, prefix: converters.Prefix):
"""Change guild prefix"""
"""Change guild prefix"""
self.shiro.set_guild_setting(ctx.guild.id, "prefix", prefix)
embed = discord.Embed(color=7830745, title=_("**\\⚙️ Prefix**"))
embed.description = _("Server prefix were set to `{0}`. If you forget it, "
@@ -194,19 +194,19 @@ def get_round_winner(self, ctx, songs, message_id):
await ctx.send(embed=embed)
await player.skip()

@commands.command(aliases=["openingquiz", "openings", "ops", "op", "play", "p"])
@commands.command(aliases=["openingquiz", "openings", "op", "ops", "play", "p"])
@commands.check(checks.voice_available)
async def opquiz(self, ctx, rounds: converters.RangeInt(1, 25) = 10):
"""Guess anime openings with specified amount of rounds\n"""
await self.run_quiz(ctx, "Opening", rounds)

@commands.command(aliases=["endingquiz", "endings", "eds", "ed"])
@commands.command(aliases=["endingquiz", "endings", "ed", "eds"])
@commands.check(checks.voice_available)
async def edquiz(self, ctx, rounds: converters.RangeInt(1, 25) = 10):
"""Openings are too easy for you? This is next level!"""
await self.run_quiz(ctx, "Ending", rounds)

@commands.command(aliases=["osts", "ost", "soundtrack", "soundtracks"])
@commands.command(aliases=["ost", "osts", "soundtrack", "soundtracks"])
@commands.check(checks.voice_available)
@commands.check(checks.has_voted)
async def ostquiz(self, ctx, rounds: converters.RangeInt(1, 25) = 10):
@@ -64,15 +64,6 @@ def __init__(self, shiro):
value=f"[{after['reference']}{after['title']}]({after['url']})")
await ctx.send(embed=embed)

@commands.command(aliases=["shutdown", "update"])
@commands.check(checks.is_owner)
async def commit(self, ctx):
"""Shut down bot for update"""
embed = discord.Embed(color=7830745, title=_("**\\🔧 Bot update**"),
description=_("Bot stopping, {0} audio players will be shut down.").format(
len(self.shiro.lavalink.players)))
await ctx.send(embed=embed)
self.shiro.shutdown()

def setup(shiro):
shiro.add_cog(Utility(shiro))
@@ -38,7 +38,7 @@ def __init__(self, max_len):
class Prefix(commands.Converter):
"""Converts to str if values length is in range"""
async def convert(self, ctx, argument):
if 1 <= len(argument) <= 10 and argument.isalnum():
if all(ord(c) < 128 for c in argument):
return argument

raise exceptions.NotPrefix(argument)

0 comments on commit 5004ed2

Please sign in to comment.
You can’t perform that action at this time.