2023-08-20 14:29:07 +09:00

176 lines
12 KiB
Plaintext

<!DOCTYPE html>
<html>
<%- include('../includes/head') %>
<body class="hold-transition skin-blue sidebar-mini">
<div class="wrapper">
<!-- The header is the topbar -->
<%- include('../includes/header') %>
<!-- The sidebar includes the menu -->
<%- include('../includes/sidebar') %>
<!-- Content Wrapper. Contains page content -->
<div class="content-wrapper">
<!-- Content Header (Page header) -->
<section class="content-header">
<h3> Greeting </h3>
<ol class="breadcrumb">
<li><a href="/"><i class="fa fa-home"></i>Selector</a></li>
<li><a href="<%=`/manage/${guild.id}/`%>"><%=guild.name%></a></li>
<li class="active">Greeting</li>
</ol>
</section>
<!-- Content -->
<section class="content">
<div class="row">
<div class="col-md-6">
<!-- WELCOME CONFIGURATION -->
<div class="box box-success">
<div class="box-header with-border">
<h3 class="box-title">Welcome Embed</h3>
</div>
<form role="form" action="/manage/<%= guild.id %>/greeting" method="POST">
<div class="box-body">
<div class="form-group">
<label>Content</label>
<% if(guild.welcome.embed.description || guild.welcome.content) {%>
<textarea rows="3" name="content" class="form-control"><%- guild.welcome.content?.replaceAll(/\\n/g, '&#10;') %></textarea>
<% } else { %>
<textarea rows="3" name="content" class="form-control" placeholder="<%= 'Welcome to the server {member:name} 🎉' %>"></textarea>
<% } %>
</div>
<div class="form-group">
<label>Description</label>
<textarea rows="3" name="description" class="form-control"><%- guild.welcome.embed.description?.replaceAll(/\\n/g, '&#10;') %></textarea>
</div>
<div class="form-group">
<label>Footer</label>
<input type="text" name="footer" class="form-control" value="<%= guild.welcome.embed.footer %>">
</div>
<div class="form-group">
<label>Hex Color</label>
<input type="text" name="hexcolor" class="form-control" value="<%= guild.welcome.embed.color %>">
</div>
<div class="form-group">
<label>Channel</label>
<select class="form-control" name="channel">
<% if(bot.channels.cache.has(guild.welcome.channel)){ %>
<option selected="selected">#<%= bot.channels.cache.get(guild.welcome.channel).name %></option>
<% guild.channels.cache.filter((ch) => ch.id !== guild.welcome.channel && ch.type === "GUILD_TEXT").forEach((ch) => { %>
<option>#<%= ch.name %></option>
<% }); } else { %>
<option selected="selected">#<%= guild.channels.cache.filter((ch) => ch.type === "GUILD_TEXT").first().name %></option>
<% guild.channels.cache.filter((ch) => ch.id !== guild.channels.cache.first().id && ch.type === "GUILD_TEXT").forEach((ch) => { %>
<option>#<%= ch.name %></option>
<% }); %>
<% } %>
</select>
</div>
<div class="form-group">
<div class="checkbox">
<label>
<% if(guild.welcome.embed.thumbnail) { %>
<input type="checkbox" name="thumbnail" checked>Thumbnail
<% } else { %>
<input type="checkbox" name="thumbnail">Thumbnail
<% } %>
</label>
</div>
</div>
</div>
<div class="box-footer">
<% if(guild.welcome.enabled){ %>
<button type="submit" name="welcomeDisable" class="btn btn-danger">Disable Messages</button>
<button type="submit" name="welcomeUpdate" class="btn btn-primary pull-right">Update</button>
<% } else { %>
<button type="submit" name="welcomeEnable" class="btn btn-success">Enable Message</button>
<% } %>
</div>
</form>
</div>
</div>
<div class="col-md-6">
<!-- FAREWELL CONFIGURATION -->
<div class="box box-danger">
<div class="box-header with-border">
<h3 class="box-title">Farewell Configuration</h3>
</div>
<form role="form" action="/manage/<%= guild.id %>/greeting" method="POST">
<div class="box-body">
<div class="form-group">
<label>Content</label>
<% if(guild.farewell.embed.description || guild.farewell.content) {%>
<textarea rows="3" name="content" class="form-control"><%- guild.farewell.content?.replaceAll(/\\n/g, '&#10;') %></textarea>
<% } else { %>
<textarea rows="3" name="content" class="form-control" placeholder="<%= '{member:tag} has left the server 👋' %>"></textarea>
<% } %>
</div>
<div class="form-group">
<label>Description</label>
<textarea rows="3" name="message" class="form-control"><%- guild.farewell.embed.description?.replaceAll(/\\n/g, '&#10;') %></textarea>
</div>
<div class="form-group">
<label>Footer</label>
<input type="text" name="footer" class="form-control" value="<%= guild.farewell.embed.footer %>">
</div>
<div class="form-group">
<label>Hex Color</label>
<input type="text" name="hexcolor" class="form-control" value="<%= guild.farewell.embed.color %>">
</div>
<div class="form-group">
<label>Channel</label>
<select class="form-control" name="channel">
<% if(bot.channels.cache.has(guild.farewell.channel)){ %>
<option selected="selected">#<%= bot.channels.cache.get(guild.farewell.channel).name %></option>
<% guild.channels.cache.filter((ch) => ch.id !== guild.farewell.channel && ch.type === "GUILD_TEXT").forEach((ch) => { %>
<option>#<%= ch.name %></option>
<% }); } else { %>
<option selected="selected">#<%= guild.channels.cache.filter((ch) => ch.type === "GUILD_TEXT").first().name %></option>
<% guild.channels.cache.filter((ch) => ch.id !== guild.channels.cache.first().id && ch.type === "GUILD_TEXT").forEach((ch) => { %>
<option>#<%= ch.name %></option>
<% }); %>
<% } %>
</select>
</div>
<div class="form-group">
<div class="checkbox">
<label>
<% if(guild.farewell.embed.thumbnail) { %>
<input type="checkbox" name="thumbnail" checked>Thumbnail
<% } else { %>
<input type="checkbox" name="thumbnail">Thumbnail
<% } %>
</label>
</div>
</div>
</div>
<div class="box-footer">
<% if(guild.farewell.enabled){ %>
<button type="submit" name="farewellDisable" class="btn btn-danger">Disable Messages</button>
<button type="submit" name="farewellUpdate" class="btn btn-primary pull-right">Update</button>
<% } else { %>
<button type="submit" name="farewellEnable" class="btn btn-success">Enable Message</button>
<% } %>
</div>
</form>
</div>
</div>
<div>
</section>
</div>
<!-- /.content-wrapper -->
<%- include('../includes/footer') %>
</div>
<!-- ./wrapper -->
</body>
</html>