aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.github/ISSUE_TEMPLATE/resource_suggestion.md21
-rw-r--r--pydis_site/apps/api/viewsets/bot/aoc_link.py2
-rw-r--r--pydis_site/apps/content/resources/guides/python-guides/discord-embed-limits.md21
-rw-r--r--pydis_site/apps/content/resources/guides/python-guides/keeping-tokens-safe.md2
-rw-r--r--pydis_site/apps/content/resources/guides/python-guides/vps-services.md31
-rw-r--r--pydis_site/templates/events/sidebar/code-jams/7.html2
6 files changed, 55 insertions, 24 deletions
diff --git a/.github/ISSUE_TEMPLATE/resource_suggestion.md b/.github/ISSUE_TEMPLATE/resource_suggestion.md
deleted file mode 100644
index f09f8a9b..00000000
--- a/.github/ISSUE_TEMPLATE/resource_suggestion.md
+++ /dev/null
@@ -1,21 +0,0 @@
----
-name: Resource Suggestion
-about: Suggest a resource for the Python Discord resource index.
-title: 'Resource Suggestion: '
-labels: 'resource suggestion'
-assignees: 'swfarnsworth'
----
-
-**Resource name**
-
-**Resource location**\
-Should be a link of some kind, either to the resource itself or (in the case of resources that must be purchased) an information page about it.
-
-**Payment type**\
-Options are free, paid, and subscription. Combinations of these are allowed for special cases (like a limited free version).
-
-**Why it should be included**\
-A brief explanation for why you think this resource is valuable.
-
-**Potential limitations**\
-Is the resource easy to use? Does it contain good information but have poorly-written code? Is it outdated in some way? If so, explain why it should still be included.
diff --git a/pydis_site/apps/api/viewsets/bot/aoc_link.py b/pydis_site/apps/api/viewsets/bot/aoc_link.py
index 9f22c1a1..c7a96629 100644
--- a/pydis_site/apps/api/viewsets/bot/aoc_link.py
+++ b/pydis_site/apps/api/viewsets/bot/aoc_link.py
@@ -68,4 +68,4 @@ class AocAccountLinkViewSet(
serializer_class = AocAccountLinkSerializer
queryset = AocAccountLink.objects.all()
filter_backends = (DjangoFilterBackend,)
- filter_fields = ("user__id",)
+ filter_fields = ("user__id", "aoc_username")
diff --git a/pydis_site/apps/content/resources/guides/python-guides/discord-embed-limits.md b/pydis_site/apps/content/resources/guides/python-guides/discord-embed-limits.md
new file mode 100644
index 00000000..ca97462b
--- /dev/null
+++ b/pydis_site/apps/content/resources/guides/python-guides/discord-embed-limits.md
@@ -0,0 +1,21 @@
+---
+title: Discord Embed Limits
+description: A guide that shows the limits of embeds in Discord and how to avoid them.
+---
+
+If you plan on using embed responses for your bot you should know the limits of the embeds on Discord or you will get `Invalid Form Body` errors:
+
+- Embed **title** is limited to **256 characters**
+- Embed **description** is limited to **4096 characters**
+- An embed can contain a maximum of **25 fields**
+- A **field name/title** is limited to **256 character** and the **value of the field** is limited to **1024 characters**
+- Embed **footer** is limited to **2048 characters**
+- Embed **author name** is limited to **256 characters**
+- The **total of characters** allowed in an embed is **6000**
+
+Now if you need to get over this limit (for example for a help command), you would need to use pagination.
+There are several ways to do that:
+
+- A library called **[disputils](https://pypi.org/project/disputils)**
+- An experimental library made by the discord.py developer called **[discord-ext-menus](https://github.com/Rapptz/discord-ext-menus)**
+- Make your own setup using **[wait_for()](https://discordpy.readthedocs.io/en/stable/ext/commands/api.html#discord.ext.commands.Bot.wait_for)** and wait for a reaction to be added
diff --git a/pydis_site/apps/content/resources/guides/python-guides/keeping-tokens-safe.md b/pydis_site/apps/content/resources/guides/python-guides/keeping-tokens-safe.md
index 6b5dae34..272ad45a 100644
--- a/pydis_site/apps/content/resources/guides/python-guides/keeping-tokens-safe.md
+++ b/pydis_site/apps/content/resources/guides/python-guides/keeping-tokens-safe.md
@@ -14,7 +14,7 @@ If for whatever reason your token gets leaked, you should immediately follow the
- Select the Bot (1) tab on the left-hand side, next to a small image of a puzzle piece. After doing so you should see a small section named TOKEN (under your bot USERNAME and next to his avatar image)
- Press the Regenerate option to regen your bot token.
-![Steps to Take to Reset your Discord Bot](https://cdn.discordapp.com/attachments/343944376055103488/845290595793764392/regen_token.png)
+![Steps to Take to Reset your Discord Bot](https://cdn.discordapp.com/attachments/859123972884922418/966502706258784366/unknown.png)
Following these steps will create a new token for your bot, making it secure again and terminating any connections from the leaked token.
diff --git a/pydis_site/apps/content/resources/guides/python-guides/vps-services.md b/pydis_site/apps/content/resources/guides/python-guides/vps-services.md
new file mode 100644
index 00000000..0acd3e55
--- /dev/null
+++ b/pydis_site/apps/content/resources/guides/python-guides/vps-services.md
@@ -0,0 +1,31 @@
+---
+title: VPS Services
+description: On different VPS services
+---
+
+If you need to run your bot 24/7 (with no downtime), you should consider using a virtual private server (VPS). This is a list of VPS services that are sufficient for running Discord bots.
+
+* Europe
+ * [netcup](https://www.netcup.eu/)
+ * Germany & Austria data centres.
+ * Great affiliate program.
+ * [Yandex Cloud](https://cloud.yandex.ru/)
+ * Vladimir, Ryazan, and Moscow region data centres.
+ * [Scaleway](https://www.scaleway.com/)
+ * France data centre.
+ * [Time 4 VPS](https://www.time4vps.eu/)
+ * Lithuania data centre.
+* US
+ * [GalaxyGate](https://galaxygate.net/)
+ * New York data centre.
+ * Great affiliate program.
+* Global
+ * [Linode](https://www.linode.com/)
+ * [Digital Ocean](https://www.digitalocean.com/)
+ * [OVHcloud](https://www.ovhcloud.com/)
+ * [Vultr](https://www.vultr.com/)
+
+---
+# Free hosts
+There are no reliable free options for VPS hosting. If you would rather not pay for a hosting service, you can consider self-hosting.
+Any modern hardware should be sufficient for running a bot. An old computer with a few GB of ram could be suitable, or a Raspberry Pi.
diff --git a/pydis_site/templates/events/sidebar/code-jams/7.html b/pydis_site/templates/events/sidebar/code-jams/7.html
index d4615c2a..4aefdbd9 100644
--- a/pydis_site/templates/events/sidebar/code-jams/7.html
+++ b/pydis_site/templates/events/sidebar/code-jams/7.html
@@ -1,7 +1,7 @@
{% load static %}
<div class="box">
- <img src="https://raw.githubusercontent.com/python-discord/branding/master/events/summer_code_jam_2020/summer%20cj%202020%20discord%20banner.png" alt="Summer Code Jam 2020">
+ <img src="https://raw.githubusercontent.com/python-discord/branding/master/jams/summer_code_jam_2020/summer%20cj%202020%20discord%20banner.png" alt="Summer Code Jam 2020">
<p class="menu-label">Sponsors</p>
<a href="https://www.djangoproject.com/" target="_blank">
<img src="https://static.djangoproject.com/img/logos/django-logo-positive.png" alt="Django">