Skip to content

Commit

Permalink
Created a new public "premium-perks" page, and added details about pa…
Browse files Browse the repository at this point in the history
…treon on premium page. (#1713)

* created a new public premium-perks page, and added details about patreon slots on premium page

* created a new public premium-perks page, and added details about patreon slots on premium page
  • Loading branch information
ashishjh-bst authored Aug 12, 2024
1 parent 8eae5d6 commit 0f17419
Show file tree
Hide file tree
Showing 3 changed files with 92 additions and 68 deletions.
75 changes: 75 additions & 0 deletions premium/assets/premium-perks.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
{{define "premium_perks"}}
{{template "cp_head" .}}

<div class="page-header">
<h2>Premium Perks</h2>
</div>

{{template "cp_alerts" .}}

<div class="row">
<div class="col-lg-12">
<section class="card">
<header class="card-header">
<h2 class="card-title">Info</h2>
</header>
<div class="card-body">
<p>Premium helps covers server cost and supports the development of the bot</p>
<p>Here you can find the features that premium subscription provides.</p>
<button class="btn btn-primary mb-2" type="button" data-toggle="collapse"
data-target="#premium-how-to-get" aria-expanded="true" aria-controls="premium-how-to-get">
How to get premium?
</button>
<div class="collapse" id="premium-how-to-get">
<section class="card">
<div class="card-body">
<ul>
<li>Make a pledge on our <a href="https://patreon.com/yagpdb">Patreon</a>. Tiers $3 and above
will grant you premium slots. It can take up to 10 minutes from you making a pledge to it
being processed on our side. (If you do not see your premium slots after that time, please contact us through the support server.)</li>
</ul>
</div>
</section>
</div><br>
<button class="btn btn-primary" type="button" data-toggle="collapse"
data-target="#premium-full-benefits" aria-expanded="true" aria-controls="premium-full-benefits">
Full list of premium benefits
</button>
<div class="collapse" id="premium-full-benefits">
<section class="card">
<div class="card-body">
<b>General goodies</b>
<ul>
<li>Trigger CCs on Message Edit </li>
<li>Retroactive AutoRole Scan and Assignment </li>
<li>Access to priority support channels on our support server ($5 and above subscription only)</li>
</ul>

<b>Extended limits:</b>
<ul>
<li>Message cache duration increased from 1 hour to 12 hours, which means you will be
able to see the removed messages in the logs if the message was sent in the previous
12 hours</li>
<li>Max custom commands increased from 100 to 250</li>
<li>Max Reddit feeds increased from 20 to 1000</li>
<li>Max Youtube feeds increased from 10 to 250 (Possibly higher if needed)</li>
<li>Max Soundboard sounds increased from 50 to 250 (Possibly higher if needed)</li>
<li>Custom Command Length increased to 20000 characters from 10000</li>
<li>Increased database storage and interaction limits.</li>
<li>Various custom command function limits increased</li>
<li>Advanced Automod limits increased</li>
</ul>
</div>
</section>
</div>
</div>
</section>
<!-- /.panel -->
</div>
<!-- /.col-lg-12 -->
</div>


{{template "cp_footer" .}}

{{end}}
75 changes: 9 additions & 66 deletions premium/assets/premium.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,82 +2,18 @@
{{template "cp_head" .}}

<div class="page-header">
<h2>Premium setup</h2>
<h2>Manage Premium</h2>
</div>

{{template "cp_alerts" .}}

<div class="row">
<div class="col-lg-12">
<section class="card">
<header class="card-header">
<h2 class="card-title">Info</h2>
</header>

<div class="card-body">
<p>Here you can redeem codes from giveaways and assign premium slots to servers.</p>
<p>You can find the features behind the paywall in the list below.</p>
<p><b>If you come across any issues with premium, please let us know!</b></p>
<p><b>Note:</b> The premium functionality is just a bonus for supporting the bot and not a "product".</p>

<button class="btn btn-primary mb-2" type="button" data-toggle="collapse"
data-target="#premium-how-to-get" aria-expanded="false" aria-controls="premium-how-to-get">
How to get premium?
</button>
<div class="collapse" id="premium-how-to-get">
<section class="card">
<div class="card-body">
<ul>
<li>Make a pledge on our <a href="https://patreon.com/yagpdb">Patreon</a>. Tiers $3 and above
will grant you premium slots. It can take up to 10 minutes from you making a pledge to it
being processed on our side. (If you do not see your premium slots after that time, please contact us through the support server.)</li>
</ul>
</div>
</section>
</div><br>
<button class="btn btn-primary" type="button" data-toggle="collapse"
data-target="#premium-full-benefits" aria-expanded="false" aria-controls="premium-full-benefits">
Full list of premium benefits
</button>
<div class="collapse" id="premium-full-benefits">
<section class="card">
<div class="card-body">
<b>General goodies</b>
<ul>
<li>Trigger CCs on Message Edit </li>
<li>Retroactive AutoRole Scan and Assignment </li>
<li>Access to priority support channels on our support server</li>
</ul>

<b>Extended limits:</b>
<ul>
<li>Message cache duration increased from 1 hour to 12 hours, which means you will be
able to see the removed messages in the logs if the message was sent in the previous
12 hours</li>
<li>Max custom commands increased from 100 to 250</li>
<li>Max Reddit feeds increased from 100 to 1000</li>
<li>Max Youtube feeds increased from 50 to 250 (Possibly higher if needed)</li>
<li>Max Soundboard sounds increased from 50 to 250 (Possibly higher if needed)</li>
<li>Increased database storage and interaction limits.</li>
<li>Various custom command function limits increased</li>
</ul>
</div>
</section>
</div>
</div>
</section>
<!-- /.panel -->
</div>
<!-- /.col-lg-12 -->
</div>
<!-- /.row -->
<div class="row">
<div class="col-lg-12">
<section class="card">
<header class="card-header">
<h2 class="card-title">Redeem code</h2>
<h1 class="card-title">Redeem code</h1>
</header>

<div class="card-body">
<form method="post" data-async-form>
<input type="text" class="form-control mb-2" name="code">
Expand All @@ -86,6 +22,13 @@ <h2 class="card-title">Redeem code</h2>
<button type="submit" value="Check code" class="btn btn-primary"
formaction="/premium/lookupcode">Check code</button>
</form>
<div class="mt-5">
<p>If you're coming here after making a payment on patreon, <a href="https://support.patreon.com/hc/en-us/articles/212052266-Getting-Discord-access" target="_blank">you need to connect your discord to patreon</a>
Once that is done, your slots will appear below automatically with-in 10 minutes.
Premium slots are assigned to servers, you can assign them to any server you have manage server permissions on.
If you don't see your slots after 10 minutes, please contact us on the <a href="https://discord.gg/4udtcA5" target="_blank">support server.</a></p>
<p>To learn more about what premium features and how to get premium, check the <a href="/premium-perks" target="_blank">premium perks</a> list.</p>
</div>

{{if .QueriedCode}}
<ul>
Expand Down
10 changes: 8 additions & 2 deletions premium/plugin_web.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,10 @@ import (
)

//go:embed assets/premium.html
var PageHTML string
var PremiumHTML string

//go:embed assets/premium-perks.html
var PremiumPerksHTML string

type CtxKey int

Expand All @@ -36,14 +39,17 @@ var (
var _ web.Plugin = (*Plugin)(nil)

func (p *Plugin) InitWeb() {
web.AddHTMLTemplate("premium/assets/premium.html", PageHTML)
web.AddHTMLTemplate("premium/assets/premium.html", PremiumHTML)
web.AddHTMLTemplate("premium/assets/premium-perks.html", PremiumPerksHTML)

web.CPMux.Use(PremiumGuildMW)
web.ServerPublicMux.Use(PremiumGuildMW)

submux := goji.SubMux()
web.RootMux.Handle(pat.New("/premium"), submux)
web.RootMux.Handle(pat.New("/premium/*"), submux)
web.RootMux.Handle(pat.New("/premium-perks"), web.RenderHandler(nil, "premium_perks"))
web.RootMux.Handle(pat.New("/premium-perks/*"), web.ControllerHandler(nil, "premium_perks"))

submux.Use(web.RequireSessionMiddleware)

Expand Down

0 comments on commit 0f17419

Please sign in to comment.