This commit is contained in:
ultimateplayer1999 2023-05-24 08:31:35 +00:00
parent 7a84de548a
commit aea2009d93
16 changed files with 503 additions and 166 deletions

View File

@ -34,7 +34,7 @@ mongoose.connect(uri, {
module.exports = {
name: "wolfcount",
private: false,
description: "Returns the amount of times the letters wolf were said by users (state refreshes every 2 minutes).",
description: "Returns the amount of times the letters wolf were said by users.",
run: async (client, interaction) => {

View File

@ -0,0 +1,44 @@
require("dotenv").config();
const { EmbedBuilder, REST, Routes } = require('discord.js');
ownerList = [
'213966480621043712'
];
const rest = new REST().setToken(process.env.TOKEN);
// module.exports = {
// name: "deleteslashcommands",
// private: true,
// description: "Deregister guild slash commands",
// run: async (client, interaction) => {
// if (ownerList.includes(interaction.user.id)) {
// rest.put(Routes.applicationGuildCommands(client.user.id, interaction.guild.id), { body: [] })
// .then(() => {
// console.log(`Successfully deleted all guild commands of guild ${interaction.guild.id}.`)
// const embed = new EmbedBuilder()
// .setColor("#FF0000")
// .setTitle("Slash commands deleted successfully")
// .setDescription(`Guild slash commands deleted successfully`)
// .setTimestamp()
// .setFooter({ text: `Requested by ${interaction.user.tag}`, iconURL: `${interaction.user.displayAvatarURL()}` });
// interaction.followUp({ embeds: [embed] });
// })
// .catch((err) => {
// interaction.followUp({ content: 'Something went wrong'});
// console.log(err);
// });
// } else {
// const embed = new EmbedBuilder()
// .setColor("#FF0000")
// .setTitle("🐺 no perms")
// .setDescription(`You have no perms to do this.`)
// .setTimestamp()
// .setFooter({ text: `Requested by ${interaction.user.tag}`, iconURL: `${interaction.user.displayAvatarURL()}` });
// interaction.followUp({ embeds: [embed] });
// }
// },
// };

View File

@ -0,0 +1,36 @@
const { EmbedBuilder, SlashCommandBuilder } = require('discord.js');
const client = require('../../index.js');
developerList = [
'213966480621043712',
];
module.exports = {
name: "setstatus",
private: true,
description: "Set status",
run: async (client, interaction) => {
if (developerList.includes(interaction.user.id)) {
client.user.setStatus('dnd')
const embed = new EmbedBuilder()
.setColor("#FF0000")
.setTitle("Status set")
.setDescription(`Bot status set to predefined value`)
.setTimestamp()
.setFooter({ text: `Requested by ${interaction.user.tag}`, iconURL: `${interaction.user.displayAvatarURL()}` });
interaction.followUp({ embeds: [embed] });
} else {
const embed = new EmbedBuilder()
.setColor("#FF0000")
.setTitle("🐺 no perms")
.setDescription(`You have no perms to do this.`)
.setTimestamp()
.setFooter({ text: `Requested by ${interaction.user.tag}`, iconURL: `${interaction.user.displayAvatarURL()}` });
interaction.followUp({ embeds: [embed] });
}
},
};

View File

@ -1,5 +1,6 @@
const { EmbedBuilder } = require('discord.js');
const wolfcount = require('../../models/wolfcount');
const { spawn } = require("child_process");
ownerList = [
'213966480621043712',
@ -33,6 +34,8 @@ module.exports = {
.setFooter({ text: `Requested by ${interaction.user.tag}`, iconURL: `${interaction.user.displayAvatarURL()}` });
interaction.followUp({ embeds: [embed] });
basecount = resetcount;
} else {
const embed = new EmbedBuilder()
.setColor("#FF0000")

View File

@ -6,7 +6,7 @@ const wolfChars = ['w', 'o', 'l', 'f'];
client.on("messageCreate", async (message) => {
if (message.author.bot) return;
if (message.content.includes(">>")) return;
if (message.content.includes(">>") || message.content.includes(">r>")) return;
// convert the message to lowercase
const lowerMsg = message.content.toLowerCase();
@ -27,6 +27,21 @@ client.on("messageCreate", async (message) => {
console.log('');
console.log('Live wolf count:', newcount);
if (newcount == 69) {
message.react("1103666748592488549").catch(err=>console.log(err)); // pogslide
message.react("1103673748466434140").catch(err=>console.log(err)); // 69nice
}
if (newcount == 100) {
message.react("💯").catch(err=>console.log(err));
message.react("1103666748592488549").catch(err=>console.log(err)); // pogslide
}
if (newcount == 420) {
message.react("1103666748592488549").catch(err=>console.log(err)); // pogslide
message.react("1103675067054948392").catch(err=>console.log(err)); // pepe_high
}
// update the wolf count
wolfcount.findByIdAndUpdate("6447da87681fd1bc486a4923", {count: newcount}).then(() => {

View File

@ -1,15 +1,51 @@
const client = require("../index");
const { ActivityType } = require('discord.js');
const { EmbedBuilder, ActivityType } = require('discord.js');
client.on("ready", () => {
console.clear();
console.log(`${client.user.tag} is up and ready to go!`);
// set the status to do not disturb
// client.user.setStatus('dnd')
client.user.setPresence({
activities: [{ name: `over msgs for certain letters`, type: ActivityType.Watching }],
// client.user.setPresence({
// activities: [{ name: `over msgs for certain letters`, type: ActivityType.Watching }],
// status: 'dnd',
// });
client.user.setPresence({
activities: [{ name: `RIP #1123`, type: ActivityType.Playing }],
status: 'dnd',
});
// Function to convert RGB to hex
function convertToHex(rgb) {
// Extract the RGB values using a regex pattern
const rgbValues = rgb.match(/\d+/g);
// Convert each RGB value to a hexadecimal string
const hexValues = rgbValues.map((value) => {
// Convert the value to a number
const intValue = parseInt(value);
// Convert the number to a hexadecimal string
const hexString = intValue.toString(16);
// Pad the string with zero if needed
return hexString.padStart(2, '0');
});
// Return the hex color string
return `#${hexValues.join('')}`;
};
const readyEmbed = new EmbedBuilder()
.setTitle('Now online!')
.setColor(convertToHex('rgb(119, 152, 229)'))
.setAuthor({ name: client.user.tag, iconURL: client.user.avatarURL() })
.setTimestamp()
.setDescription(`${client.user.tag} is nu online`);
// client.channels.cache.get(`967754078438449192`).send(`${client.user.tag} is nu online.`);
client.channels.cache.get(`967754078438449192`).send({ embeds: [readyEmbed] })
});

View File

@ -1,4 +1,5 @@
require("dotenv").config();
const { ActivityType } = require("discord.js");
const { glob } = require("glob");
const { promisify } = require("util");
const globPromise = promisify(glob);
@ -54,7 +55,8 @@ module.exports = async (client) => {
basecount = countdocument.count || 0;
console.log('');
console.log(`Starting count from ${basecount}`)
console.log(`Starting count from ${basecount}`);
console.log(``);
}).catch((error) => {
console.error(error);
});
@ -76,6 +78,11 @@ module.exports = async (client) => {
// Slash Commands Register
client.on("ready", async () => {
// client.user.setPresence({
// activities: [{ name: `over msgs for certain letters`, type: ActivityType.Watching }],
// status: 'dnd',
// });
cron.schedule('*/2 * * * *', async () => {
console.log(`${moment(Date.now()).format('DD/MM/YY H:mm:ss')} Starting count refresh...`);

View File

@ -1,13 +1,27 @@
require("dotenv").config();
const { Client, Collection } = require("discord.js");
const { Client, Collection, Options } = require("discord.js");
const client = new Client({ intents: 34305 });
const client = new Client({
intents: 34305,
makeCache: Options.cacheWithLimits({MessageManager: 0})
// sweepers: {
// ...Options.DefaultSweeperSettings,
// messages: {
// interval: 120, // Every 2 minutes...
// lifetime: 600, // Remove messages older then 10 minutes.
// },
// },
});
module.exports = client;
// Global Variables
client.commands = new Collection();
client.slashCommands = new Collection();
console.clear();
console.log('');
console.log(`Welcome to the console of wolfcount /--/ By Ultimateplayer1999 /--/ Discord: ultimateplayer#0369`);
// Initializing the project
require("./handler")(client);

14
package-lock.json generated
View File

@ -14,6 +14,7 @@
"ejs": "^3.1.9",
"express": "^4.18.2",
"glob": "^7.2.0",
"helmet": "^7.0.0",
"moment": "^2.29.4",
"mongoose": "^7.1.0",
"node-cron": "^3.0.2"
@ -671,6 +672,14 @@
"url": "https://github.com/sponsors/ljharb"
}
},
"node_modules/helmet": {
"version": "7.0.0",
"resolved": "https://registry.npmjs.org/helmet/-/helmet-7.0.0.tgz",
"integrity": "sha512-MsIgYmdBh460ZZ8cJC81q4XJknjG567wzEmv46WOBblDb6TUd3z8/GhgmsM9pn8g2B80tAJ4m5/d3Bi1KrSUBQ==",
"engines": {
"node": ">=16.0.0"
}
},
"node_modules/http-errors": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.0.tgz",
@ -1963,6 +1972,11 @@
"resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz",
"integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A=="
},
"helmet": {
"version": "7.0.0",
"resolved": "https://registry.npmjs.org/helmet/-/helmet-7.0.0.tgz",
"integrity": "sha512-MsIgYmdBh460ZZ8cJC81q4XJknjG567wzEmv46WOBblDb6TUd3z8/GhgmsM9pn8g2B80tAJ4m5/d3Bi1KrSUBQ=="
},
"http-errors": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.0.tgz",

View File

@ -18,6 +18,7 @@
"ejs": "^3.1.9",
"express": "^4.18.2",
"glob": "^7.2.0",
"helmet": "^7.0.0",
"moment": "^2.29.4",
"mongoose": "^7.1.0",
"node-cron": "^3.0.2"

View File

@ -8,126 +8,88 @@
<title><%= basecount %> Wolfs</title>
<style>
body {
background-color: #c2c2c2 !important;
margin: 0;
width: 100%;
height: 100%;
display: flex;
justify-content: center;
align-items: center;
font-family: 'Courier New', Courier, monospace;
}
body {background-color: #c2c2c2 !important;font-family: 'Courier New', Courier, monospace;}
.wolf {
width: 2em;
height: 2em;
vertical-align: middle;
}
.wolf {width: 2em;height: 2em;vertical-align: middle;}
h1 {
background-image: linear-gradient(to right, #c2c2c2, #6b6a6a);
animation: wiggle 4s linear infinite;
}
h1, h3 {background-image: linear-gradient(to right, #c2c2c2, #6b6a6a);/*animation: wiggle 4s linear infinite;*/}
/* Keyframes */
@keyframes wiggle {
0%, 7% {
transform: rotateZ(0);
}
15% {
transform: rotateZ(-25deg);
}
20% {
transform: rotateZ(20deg);
}
25% {
transform: rotateZ(-20deg);
}
30% {
transform: rotateZ(10deg);
}
35% {
transform: rotateZ(-10deg);
}
40% {
transform: rotateZ(6deg);
}
45% {
transform: rotateZ(-4deg);
}
50%,100% {
transform: rotateZ(0deg);
}
0%, 7% {transform: rotateZ(0);}
15% {transform: rotateZ(-25deg);}
20% {transform: rotateZ(20deg);}
25% {transform: rotateZ(-20deg); }
30% {transform: rotateZ(10deg);}
35% {transform: rotateZ(-10deg);}
40% {transform: rotateZ(6deg);}
45% {transform: rotateZ(-4deg);}
50%,100% {transform: rotateZ(0deg);}
}
.wolfcounting {
padding: 20% 0;
@keyframes colorchange {
from {color: aqua;}
to {color: blue}
}
@media screen and (max-width: 1024px) {
.wolfcounting {
padding: 30% 0;
}
}
/* .wolfcounting {margin: 25% auto;background-color: #c2c2c2 !important;width: 100%;height: 100%;display: flex;justify-content: center;align-items: center;animation-name: wiggle; animation-duration: 3s;animation-iteration-count: 3;animation-delay: 3s;} */
.wolfcounting {margin: 25% auto;background-color: #c2c2c2 !important;width: 100%;height: 100%;display: flex;justify-content: center;align-items: center;animation-name: colorchange; animation-duration: 3s;animation-iteration-count: 4;}
.wolfcounter-other {margin-right:6px;width: 100%;height: 100%;display: flex;justify-content: center;align-items: center;}
.wolfcounter-other a {color:black; animation-name: colorchange; animation-duration: 3s; animation-iteration-count: 3;animation-delay: 3s;}
.wolfcounter-other a:nth-child(1) {color:green}
.wolfcounter-other a:nth-child(3) {color:blue}
.wolfpadding{padding: 0.2vh 5px;}
@media screen and (max-width: 768px) {
.wolfcounting {
padding: 38% 0;
}
}
.wolf-footer {margin-right:6px;width: 100%;height: 100%;display: flex;justify-content: center;align-items: center;background-image: linear-gradient(to right, aquamarine, blue);padding: 20px;margin-top:-29px;}
@media screen and (max-width: 717px) {
.wolfcounting {
padding: 25% 0;
}
}
/* Custom for up to 1400px */
@media (min-width: 1201px) and (max-width:1400px) { .wolfcounting {margin: 26% auto !important;} }
@media screen and (max-width: 425px) {
.wolfcounting {
padding: 72% 0;
}
}
/* Extra Large devices */
@media (min-width: 1200px) { .wolfcounting {margin: 20% auto;} }
/* Medium devices (tablets, 768px and up) */
@media (min-width: 768px) and (max-width: 991.98px) { .wolfcounting {margin: 35% auto;} }
/* Galaxy A13 (and all devices sharing the same width)*/
@media (min-width: 718px) and (max-width: 720px) { .wolfcounting {margin: 90% auto;}.h1, h1 {font-size: .51rem !important;} .wolfpadding{padding: 6.1vh 5px;} .wolf-copy h3 {font-size: .75rem;} }
/* Galaxy Fold (extended) */
@media (max-width: 717px) { .wolfcounting {margin: 25% auto;} }
/* Small devices (landscape phones, 376px and up) */
@media (min-width: 376px) and (max-width: 425px) { .wolfcounting {margin: 70% auto;} }
/* Small devices (landscape phones, 321px and up) */
@media (min-width: 321px) and (max-width: 375px) { .wolfcounting {margin: 78% auto;} }
/* Small devices (landscape phones, 320px and under) */
@media (max-width: 320px) { .wolfcounting {margin: 90% auto;} }
</style>
<!-- Bootstrap CSS -->
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@4.6.2/dist/css/bootstrap.min.css" integrity="sha384-xOolHFLEh07PJGoPkLv1IbcEPTNtaed2xpHsD9ESMhqIYd0nLMwNLD69Npy4HI+N" crossorigin="anonymous">
</head>
<body>
<!-- <h1><span>${basecount} wolfs</span><img class="wolf" src="images/wolf.png"></h1> -->
<div class="wolfcounting"><h1 style="box-shadow: 4px 6px; border: 3px solid grey; padding: 0.2vh 5px;"><span style="text-shadow: 2px 1px grey;"><%= basecount %> wolfs</span><img class="wolf" src="/wolf.png"></h1></div>
<nav>
<div class="wolfcounter-other">
<h3 style="box-shadow: 4px 6px; border: 3px solid grey; padding: 0.vh 5px;">
<a href="/info">Some info</a>
<a href="/privacy">Privacy Policy</a>
<a href="/tos">TOS</a>
</h3>
</div>
</nav>
<div class="wolfcounting"><h1 class="wolfpadding" style="box-shadow: 4px 6px; border: 3px solid grey;"><span style="text-shadow: 2px 1px grey;"><%= basecount %> wolfs</span><img class="wolf" src="/wolf.png"></h1></div>
<footer class="wolf-footer container-fluid">
<div style="padding: 0 28px"><h3 style="box-shadow: 4px 6px; border: 3px solid grey; padding: 1.2vh 5px;" class="wolf-copy">©<script>document.write(new Date().getFullYear())</script> Ultimateplayer1999 (ultimateplayer#0369)</h3></div>
</footer>
<!-- Bootstrap JS -->
<script src="https://cdn.jsdelivr.net/npm/jquery@3.5.1/dist/jquery.slim.min.js" integrity="sha384-DfXdz2htPH0lsSSs5nCTpuj/zy4C+OGpamoFVy38MVBnE+IbbVYUew+OrCXaRkfj" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@4.6.2/dist/js/bootstrap.bundle.min.js" integrity="sha384-Fy6S3B9q64WdZWQUiU+q4/2Lc9npb8tCaSX9FK7E8HnRr0Jz8D6OP9dO5Vg3Q9ct" crossorigin="anonymous"></script>
</body>
</html>
<!-- <head>
<title>${basecount} Wolfs</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="theme-color" content="#c16a4f">
<link rel="icon" sizes="192x192" href="../site/assets/wolf.png">
<style>
body {
margin: 0;
width: 100%;
height: 100%;
display: flex;
justify-content: center;
align-items: center;
font-family: 'Courier New', Courier, monospace;
}
.wolf {
width: 2em;
height: 2em;
vertical-align: middle;
}
</style>
</head>
<body>
<h1><span>${basecount} wolfs</span><img class="wolf" src="../site/assets/wolf.png"></h1>
</body> -->
</html>

View File

@ -9,15 +9,60 @@
<style>
body {
background-color: #c2c2c2 !important;
margin: 0;
/* margin: 0;
width: 100%;
height: 100%;
display: flex;
justify-content: center;
align-items: center;
align-items: center; */
font-family: 'Courier New', Courier, monospace;
}
/* Keyframes */
@keyframes colorchange {
from {color: aqua;}
to {color: blue}
}
h3, .translate-box {background-image: linear-gradient(to right, #c2c2c2, #6b6a6a);}
.wolfnav {margin-right:6px;width: 100%;height: 100%;display: flex;justify-content: center;align-items: center;}
.wolfnav a {color:black; animation-name: colorchange; animation-duration: 3s; animation-iteration-count: 3;}
.wolfnav a:nth-child(1) {color:green}
.wolfnav a:nth-child(3) {color:blue}
.wolf-img img{height:760px;max-width: 100%;}
.wolf-footer {margin-right:6px;width: 100%;height: 100%;display: flex;justify-content: center;align-items: center;background-image: linear-gradient(to right, aquamarine, blue);padding: 20px;}
/* Extra Large devices */
/* @media (min-width: 1200px) { .wolf-img img{height:633px;max-width: 90%;margin: auto 40px;} } */
/* Medium devices (tablets, 768px and up) */
@media (min-width: 768px) and (max-width: 991.98px) { .wolf-img img{height:570px;max-width: 90%;margin: auto 40px;} }
/* Galaxy A13 (and all devices sharing the same width)*/
@media (min-width: 718px) and (max-width: 720px) { .wolf-footer {padding: 10px;margin-top: 28.3vh;} }
/* Galaxy Fold (extended) */
@media (max-width: 717px) { .wolfcounting {margin: 25% auto;} }
/* Small devices (landscape phones, 376px and up) */
@media (min-width: 376px) and (max-width: 425px) { .wolf-img img{height:400px;max-width: 90%;margin: auto 25px;} }
/* Small devices (landscape phones, 321px and up) */
@media (min-width: 321px) and (max-width: 375px) { .wolf-img img{height:380px;max-width: 90%;margin: auto 25px;} }
/* Small devices (landscape phones, 320px and under) */
@media (max-width: 320px) { .translate-box{ max-width: 84%;margin-left: 27px;margin-bottom: 10px; } .wolf-img img{height:330px;max-width: 90%;margin: auto 20px;} }
/* Custom devices/others */
/* Custom for up to 1400px */
/* @media (min-width: 1201px) and (max-width:1400px) { .wolfcounting {margin: 26% auto !important;} } */
@media (min-width:992px) and (max-width: 1024px) { .wolf-img img{height:633px;max-width: 90%;margin: auto 40px;} }
/* Surface Duo and Galaxy Fold (Extended)*/
@media (min-width:717px) and (max-width:720px) { .wolf-img img{height:530px;max-width: 90%;margin: auto 40px;} }
</style>
<!-- Bootstrap CSS -->
@ -26,15 +71,41 @@
<body>
<div class="container" style="padding: 10px">
<nav class="wolfnav">
<h3 style="box-shadow: 4px 6px; border: 3px solid grey; padding: 0.2vh 5px;">
<a href="/">Back to count</a>
<a href="/privacy">Privacy Policy</a>
<a href="/tos">TOS</a>
</h3>
</nav>
<div class="img-fluid wolf-img"><a href="https://imgur.com/zltFwjV"><img src="https://i.imgur.com/zltFwjV.jpg" title="source: imgur.com" /></a></div>
</div>
<div class="border container">
<h1>Some information about this bot.</h1>
<p>The bot counts how many times the set letters are found, this will be once per message. So if someone says in this case wolf bla wolf the bot only counts one (the first one). Data refreshes every 2 minutes based on cron time (so 02, 04, 06, etc...).</p>
<p>You can add this bot by going to <a href="/invite">this page</a>. It will ofcourse ask you to go through some steps set by Discord to safely add it to the wanted server (Only 100 guilds possible, it may not be verified for more).</p>
<br><br>
<a href="/">Back to count</a><br>
<a href="/privacy">Privacy policy</a><br>
<a href="/tos">Terms of Service</a>
</div>
</div><br>
<footer class="container-fluid wolf-footer">
<div class="row">
<div style="box-shadow: 4px 6px; border: 3px solid grey; padding: 0.2vh 5px;" class="translate-box col-sm-auto">
<h3>Translate this page:</h3>
<div id="google_translate_element"></div>
</div>
<div style="padding: 0 28px" class="col-sm-auto wolf-copy">
<h3 style="box-shadow: 4px 6px; border: 3px solid grey; padding: 0.2vh 5px;">©<script>document.write(new Date().getFullYear())</script> Ultimateplayer1999 (ultimateplayer#0369)</h3>
</div>
</div>
</footer>
<!-- GTRANSLATE -->
<script type="text/javascript">
function googleTranslateElementInit() {
new google.translate.TranslateElement({pageLanguage: 'en'}, 'google_translate_element');
}
</script>
<script type="text/javascript" src="//translate.google.com/translate_a/element.js?cb=googleTranslateElementInit"></script>
<!-- Bootstrap JS -->
<script src="https://cdn.jsdelivr.net/npm/jquery@3.5.1/dist/jquery.slim.min.js" integrity="sha384-DfXdz2htPH0lsSSs5nCTpuj/zy4C+OGpamoFVy38MVBnE+IbbVYUew+OrCXaRkfj" crossorigin="anonymous"></script>

42
views/notlive.txt Normal file
View File

@ -0,0 +1,42 @@
/* body {background-color: #c2c2c2 !important;margin: 0;width: 100%;
height: 100%;display: flex;justify-content: center;
align-items: center;font-family: 'Courier New', Courier, monospace;
} */
<!-- <h1><span>${basecount} wolfs</span><img class="wolf" src="images/wolf.png"></h1> -->
<!-- <div class="wolfcounter-other">
<h3 style="box-shadow: 4px 6px; border: 3px solid grey; padding: 0.2vh 5px;">Other links:
<p style="box-shadow: 4px 6px; border: 3px solid grey; padding: 0.2vh 5px;"><a href="/info">Info</a></p>
<p style="box-shadow: 4px 6px; border: 3px solid grey; padding: 0.2vh 5px;"><a href="/privacy">Privacy</a></p>
<p style="box-shadow: 4px 6px; border: 3px solid grey; padding: 0.2vh 5px;"><a href="/tos">TOS</a></p>
</h3>
</div> -->
<!-- <head>
<title>${basecount} Wolfs</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="theme-color" content="#c16a4f">
<link rel="icon" sizes="192x192" href="../site/assets/wolf.png">
<style>
body {
margin: 0;
width: 100%;
height: 100%;
display: flex;
justify-content: center;
align-items: center;
font-family: 'Courier New', Courier, monospace;
}
.wolf {
width: 2em;
height: 2em;
vertical-align: middle;
}
</style>
</head>
<body>
<h1><span>${basecount} wolfs</span><img class="wolf" src="../site/assets/wolf.png"></h1>
</body> -->

View File

@ -9,15 +9,52 @@
<style>
body {
background-color: #c2c2c2 !important;
margin: 0;
/* margin: 0;
width: 100%;
height: 100%;
display: flex;
justify-content: center;
align-items: center;
align-items: center; */
font-family: 'Courier New', Courier, monospace;
/* background-image: url("https://i.imgur.com/0xO7YqI.jpg"); */
}
/* Keyframes */
@keyframes colorchange {
from {color: aqua;}
to {color: blue}
}
h3, .translate-box {background-image: linear-gradient(to right, #c2c2c2, #6b6a6a);}
.wolfnav {margin-right:6px;width: 100%;height: 100%;display: flex;justify-content: center;align-items: center;}
.wolfnav a {color:black; animation-name: colorchange; animation-duration: 3s; animation-iteration-count: 3;}
.wolfnav a:nth-child(1) {color:green}
.wolfnav a:nth-child(3) {color:blue}
.wolf-img img{height:760px;max-width: 100%;}
.wolf-footer {margin-right:6px;width: 100%;height: 100%;display: flex;justify-content: center;align-items: center;background-image: linear-gradient(to right, aquamarine, blue);padding: 20px;}
/* Small devices (landscape phones, 320px and under) */
@media (max-width: 320px) { .translate-box{ max-width: 84%;margin-left: 27px;margin-bottom: 10px; } .wolf-img img{height:330px;max-width: 90%;margin: auto 20px;} }
/* Small devices (landscape phones, 321px and up) */
@media (min-width: 321px) and (max-width: 375px) { .wolf-img img{height:380px;max-width: 90%;margin: auto 25px;} }
/* Small devices (landscape phones, 376px and up) */
@media (min-width: 376px) and (max-width: 425px) { .wolf-img img{height:400px;max-width: 90%;margin: auto 25px;} }
/* Medium devices (tablets, 768px and up) */
@media (min-width: 768px) and (max-width: 991.98px) { .wolf-img img{height:570px;max-width: 90%;margin: auto 40px;} }
/* Custom devices/others */
/* Custom for up to 1400px */
/* @media (min-width: 1201px) and (max-width:1400px) { .wolfcounting {margin: 26% auto !important;} } */
@media (min-width:992px) and (max-width: 1024px) { .wolf-img img{height:633px;max-width: 90%;margin: auto 40px;} }
/* Surface Duo and Galaxy Fold (Extended)*/
@media (min-width:717px) and (max-width:720px) { .wolf-img img{height:530px;max-width: 90%;margin: auto 40px;} }
</style>
<!-- Bootstrap CSS -->
@ -26,6 +63,16 @@
<body>
<div class="container" style="padding: 10px">
<nav class="wolfnav">
<h3 style="box-shadow: 4px 6px; border: 3px solid grey; padding: 0.2vh 5px;">
<a href="/">Back to count</a>
<a href="/info">Some info</a>
<a href="/tos">TOS</a>
</h3>
</nav>
<div class="img-fluid wolf-img"><a href="https://imgur.com/0xO7YqI"><img src="https://i.imgur.com/0xO7YqI.jpg" title="source: imgur.com" /></a></div>
</div>
<div class="container border" style="padding:20px">
<h1>Privacy statement</h1>
<h2>Data we collect</h2>
<p>The following data will get collected by using this bot.
@ -34,13 +81,29 @@
<h2>Why we collect it?</h2>
<p>It will only get used for counting the number of messages.</p>
<h2>Does the data get shared?</h2>
<p>The message data is not shared to public, only the count is given on the page and the /wolfcount command.</p>
<br><br>
<a href="/">Back to count</a><br>
<a href="/info">Some more information</a><br>
<a href="/tos">Terms of Service</a>
</div>
<p>The message content is not shared to public, only the count is given on the landing page and the /wolfcount command. (The message content does not even get logged, it gets removed from its cache after processing)</p>
</div><br>
<footer class="container-fluid wolf-footer">
<div class="row">
<div style="box-shadow: 4px 6px; border: 3px solid grey; padding: 0.2vh 5px;" class="translate-box col-sm-auto">
<h3>Translate this page:</h3>
<div id="google_translate_element"></div>
</div>
<div style="padding: 0 28px" class="col wolf-copy">
<h3 style="box-shadow: 4px 6px; border: 3px solid grey; padding: 0.2vh 5px;">©<script>document.write(new Date().getFullYear())</script> Ultimateplayer1999 (ultimateplayer#0369)</h3>
</div>
</div>
</footer>
<!-- GTRANSLATE -->
<script type="text/javascript">
function googleTranslateElementInit() {
new google.translate.TranslateElement({pageLanguage: 'en'}, 'google_translate_element');
}
</script>
<script type="text/javascript" src="//translate.google.com/translate_a/element.js?cb=googleTranslateElementInit"></script>
<!-- Bootstrap JS -->
<script src="https://cdn.jsdelivr.net/npm/jquery@3.5.1/dist/jquery.slim.min.js" integrity="sha384-DfXdz2htPH0lsSSs5nCTpuj/zy4C+OGpamoFVy38MVBnE+IbbVYUew+OrCXaRkfj" crossorigin="anonymous"></script>

View File

@ -1,33 +0,0 @@
require("dotenv").config();
const mongoose = require('mongoose');
const wolfcount = require('../models/wolfcount');
const moment = require('moment');
const uri = `mongodb+srv://${process.env.MONGODBUSER}:${process.env.MONGODBPASS}@${process.env.MONGODBCLUSTER}/${process.env.DATABASE}?retryWrites=true&w=majority`
mongoose.connect(uri, {
useNewUrlParser: true,
useUnifiedTopology: true
}).then(() => {
console.log('');
console.log(`Connected to the database`);
}).catch((error) => {
console.log(`Failed to connect to the database`);
console.log(error);
});
console.log(`${moment(Date.now()).format('DD/MM/YY H:mm:ss')} Starting count refresh...`);
// Find a document by validation
wolfcount.findOne({ validation: 'wolfcount' }).then((countdocument) => {
console.log('');
//console.log(countdocument);
console.log(`Refreshed count`)
const basecount = countdocument.count
console.log('');
}).catch((error) => {
console.error(error);
});
console.log(`${moment(Date.now()).format('DD/MM/YY H:mm:ss')} Refreshed wolfcount on cron`);

View File

@ -9,15 +9,51 @@
<style>
body {
background-color: #c2c2c2 !important;
margin: 0;
/* margin: 0;
width: 100%;
height: 100%;
display: flex;
justify-content: center;
align-items: center;
align-items: center; */
font-family: 'Courier New', Courier, monospace;
}
/* Keyframes */
@keyframes colorchange {
from {color: aqua;}
to {color: blue}
}
h3, .translate-box {background-image: linear-gradient(to right, #c2c2c2, #6b6a6a);}
.wolfnav {margin-right:6px;width: 100%;height: 100%;display: flex;justify-content: center;align-items: center;}
.wolfnav a {color:black; animation-name: colorchange; animation-duration: 3s; animation-iteration-count: 3;}
.wolfnav a:nth-child(1) {color:green}
.wolfnav a:nth-child(3) {color:blue}
.wolf-img img{height:760px;max-width: 100%;}
.wolf-footer {margin-right:6px;width: 100%;height: 100%;display: flex;justify-content: center;align-items: center;background-image: linear-gradient(to right, aquamarine, blue);padding: 20px;}
/* Small devices (landscape phones, 320px and under) */
@media (max-width: 320px) { .translate-box{ max-width: 84%;margin-left: 27px;margin-bottom: 10px; } .wolf-img img{height:330px;max-width: 90%;margin: auto 20px;} }
/* Small devices (landscape phones, 321px and up) */
@media (min-width: 321px) and (max-width: 375px) { .wolf-img img{height:380px;max-width: 90%;margin: auto 25px;} }
/* Small devices (landscape phones, 376px and up) */
@media (min-width: 376px) and (max-width: 425px) { .wolf-img img{height:400px;max-width: 90%;margin: auto 25px;} }
/* Medium devices (tablets, 768px and up) */
@media (min-width: 768px) and (max-width: 991.98px) { .wolf-img img{height:570px;max-width: 90%;margin: auto 40px;} }
/* Custom devices/others */
/* Custom for up to 1400px */
/* @media (min-width: 1201px) and (max-width:1400px) { .wolfcounting {margin: 26% auto !important;} } */
@media (min-width:992px) and (max-width: 1024px) { .wolf-img img{height:633px;max-width: 90%;margin: auto 40px;} }
/* Surface Duo and Galaxy Fold (Extended)*/
@media (min-width:717px) and (max-width:720px) { .wolf-img img{height:530px;max-width: 90%;margin: auto 40px;} }
</style>
<!-- Bootstrap CSS -->
@ -26,15 +62,41 @@
<body>
<div class="container" style="padding: 10px">
<h1>Terms of Service</h1>
<p>This bot kinda collects messages of Discord servers, so please mind the <a href="https://discord.com/terms">Terms of Service</a> and <a href="Community Guidelines">https://discord.com/guidelines</a> of Discord.
(The bot does not store the messages like Discord does, but it is better to follow the TOS and of Discord to avoid termination)</p>
<br><br>
<a href="/">Back to count</a><br>
<a href="/info">Some more information</a><br>
<a href="/privacy">Privacy policy</a>
<nav class="wolfnav">
<h3 style="box-shadow: 4px 6px; border: 3px solid grey; padding: 0.2vh 5px;">
<a href="/">Back to count</a>
<a href="/info">Some info</a>
<a href="/privacy">Privacy Policy</a>
</h3>
</nav>
<div class="img-fluid wolf-img"><a href="https://imgur.com/Dfxdj7i"><img src="https://i.imgur.com/Dfxdj7i.jpg" title="source: imgur.com" /></a></div>
</div>
<div class="container border" style="padding: 20px;">
<h1>Terms of Service</h1>
<p>This bot kinda collects messages of Discord servers, so please mind the <a href="https://discord.com/terms">Terms of Service</a> and <a href="https://discord.com/guidelines">Community Guidelines</a> of Discord.
(The bot does not store the messages like Discord does, but it is better to follow the TOS of Discord to avoid termination)</p>
</div><br>
<footer class="container-fluid wolf-footer">
<div class="row">
<div style="box-shadow: 4px 6px; border: 3px solid grey; padding: 0.2vh 5px;" class="translate-box col-sm-auto">
<h3>Translate this page:</h3>
<div id="google_translate_element"></div>
</div>
<div style="padding: 0 28px" class="col wolf-copy">
<h3 style="box-shadow: 4px 6px; border: 3px solid grey; padding: 0.2vh 5px;">©<script>document.write(new Date().getFullYear())</script> Ultimateplayer1999 (ultimateplayer#0369)</h3>
</div>
</div>
</footer>
<!-- GTRANSLATE -->
<script type="text/javascript">
function googleTranslateElementInit() {
new google.translate.TranslateElement({pageLanguage: 'en'}, 'google_translate_element');
}
</script>
<script type="text/javascript" src="//translate.google.com/translate_a/element.js?cb=googleTranslateElementInit"></script>
<!-- Bootstrap JS -->
<script src="https://cdn.jsdelivr.net/npm/jquery@3.5.1/dist/jquery.slim.min.js" integrity="sha384-DfXdz2htPH0lsSSs5nCTpuj/zy4C+OGpamoFVy38MVBnE+IbbVYUew+OrCXaRkfj" crossorigin="anonymous"></script>