Skip to content

Commit

Permalink
feat: Update image commands
Browse files Browse the repository at this point in the history
  • Loading branch information
Zastinian committed May 6, 2024
1 parent 2071bbb commit 9994ed0
Show file tree
Hide file tree
Showing 18 changed files with 36 additions and 36 deletions.
4 changes: 2 additions & 2 deletions src/commands/images/3000years.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@ const { sticker } = require("../../lib/sticker");
module.exports = {
name: "3000years",
run: async ({ bot, message, global }) => {
const who = message.quoted
const user = message.quoted
? message.quoted.sender
: message.mentionedJid && message.mentionedJid[0]
? message.mentionedJid[0]
: message.fromMe
? bot.user.jid
: message.sender;
const response = await fetch(
`https://strangeapi.hostz.me/api/generators/3000-years?image=${encodeURIComponent(await bot.profilePictureUrl(who).catch(() => "https://w7.pngwing.com/pngs/717/24/png-transparent-computer-icons-user-profile-user-account-avatar-heroes-silhouette-black-thumbnail.png"))}}`,
`https://strangeapi.hostz.me/api/generators/3000-years?image=${encodeURIComponent(await bot.profilePictureUrl(user).catch(() => "https://w7.pngwing.com/pngs/717/24/png-transparent-computer-icons-user-profile-user-account-avatar-heroes-silhouette-black-thumbnail.png"))}}`,
{
headers: {
Authorization: `Bearer ${global.imageToken}`,
Expand Down
4 changes: 2 additions & 2 deletions src/commands/images/ad.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@ const { sticker } = require("../../lib/sticker");
module.exports = {
name: "ad",
run: async ({ bot, message, global }) => {
const who = message.quoted
const user = message.quoted
? message.quoted.sender
: message.mentionedJid && message.mentionedJid[0]
? message.mentionedJid[0]
: message.fromMe
? bot.user.jid
: message.sender;
const response = await fetch(
`https://strangeapi.hostz.me/api/generators/ad?image=${encodeURIComponent(await bot.profilePictureUrl(who).catch(() => "https://w7.pngwing.com/pngs/717/24/png-transparent-computer-icons-user-profile-user-account-avatar-heroes-silhouette-black-thumbnail.png"))}}`,
`https://strangeapi.hostz.me/api/generators/ad?image=${encodeURIComponent(await bot.profilePictureUrl(user).catch(() => "https://w7.pngwing.com/pngs/717/24/png-transparent-computer-icons-user-profile-user-account-avatar-heroes-silhouette-black-thumbnail.png"))}}`,
{
headers: {
Authorization: `Bearer ${global.imageToken}`,
Expand Down
4 changes: 2 additions & 2 deletions src/commands/images/affect.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@ const { sticker } = require("../../lib/sticker");
module.exports = {
name: "affect",
run: async ({ bot, message, global }) => {
const who = message.quoted
const user = message.quoted
? message.quoted.sender
: message.mentionedJid && message.mentionedJid[0]
? message.mentionedJid[0]
: message.fromMe
? bot.user.jid
: message.sender;
const response = await fetch(
`https://strangeapi.hostz.me/api/generators/affect?image=${encodeURIComponent(await bot.profilePictureUrl(who).catch(() => "https://w7.pngwing.com/pngs/717/24/png-transparent-computer-icons-user-profile-user-account-avatar-heroes-silhouette-black-thumbnail.png"))}}`,
`https://strangeapi.hostz.me/api/generators/affect?image=${encodeURIComponent(await bot.profilePictureUrl(user).catch(() => "https://w7.pngwing.com/pngs/717/24/png-transparent-computer-icons-user-profile-user-account-avatar-heroes-silhouette-black-thumbnail.png"))}}`,
{
headers: {
Authorization: `Bearer ${global.imageToken}`,
Expand Down
4 changes: 2 additions & 2 deletions src/commands/images/approved.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@ const { sticker } = require("../../lib/sticker");
module.exports = {
name: "approved",
run: async ({ bot, message, global }) => {
const who = message.quoted
const user = message.quoted
? message.quoted.sender
: message.mentionedJid && message.mentionedJid[0]
? message.mentionedJid[0]
: message.fromMe
? bot.user.jid
: message.sender;
const response = await fetch(
`https://strangeapi.hostz.me/api/overlays/approved?image=${encodeURIComponent(await bot.profilePictureUrl(who).catch(() => "https://w7.pngwing.com/pngs/717/24/png-transparent-computer-icons-user-profile-user-account-avatar-heroes-silhouette-black-thumbnail.png"))}}`,
`https://strangeapi.hostz.me/api/overlays/approved?image=${encodeURIComponent(await bot.profilePictureUrl(user).catch(() => "https://w7.pngwing.com/pngs/717/24/png-transparent-computer-icons-user-profile-user-account-avatar-heroes-silhouette-black-thumbnail.png"))}}`,
{
headers: {
Authorization: `Bearer ${global.imageToken}`,
Expand Down
4 changes: 2 additions & 2 deletions src/commands/images/batslap.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@ const { sticker } = require("../../lib/sticker");
module.exports = {
name: "batslap",
run: async ({ bot, message, global }) => {
const who = message.quoted
const user = message.quoted
? message.quoted.sender
: message.mentionedJid && message.mentionedJid[0]
? message.mentionedJid[0]
: message.fromMe
? bot.user.jid
: message.sender;
const response = await fetch(
`https://strangeapi.hostz.me/api/generators/batslap?image1=${encodeURIComponent(await bot.profilePictureUrl(message.sender ?? message.quoted.sender).catch(() => "https://w7.pngwing.com/pngs/717/24/png-transparent-computer-icons-user-profile-user-account-avatar-heroes-silhouette-black-thumbnail.png"))}&image2=${encodeURIComponent(await bot.profilePictureUrl(who).catch(() => "https://w7.pngwing.com/pngs/717/24/png-transparent-computer-icons-user-profile-user-account-avatar-heroes-silhouette-black-thumbnail.png"))}`,
`https://strangeapi.hostz.me/api/generators/batslap?image1=${encodeURIComponent(await bot.profilePictureUrl(message.sender ?? message.quoted.sender).catch(() => "https://w7.pngwing.com/pngs/717/24/png-transparent-computer-icons-user-profile-user-account-avatar-heroes-silhouette-black-thumbnail.png"))}&image2=${encodeURIComponent(await bot.profilePictureUrl(user).catch(() => "https://w7.pngwing.com/pngs/717/24/png-transparent-computer-icons-user-profile-user-account-avatar-heroes-silhouette-black-thumbnail.png"))}`,
{
headers: {
Authorization: `Bearer ${global.imageToken}`,
Expand Down
4 changes: 2 additions & 2 deletions src/commands/images/beautiful.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@ const { sticker } = require("../../lib/sticker");
module.exports = {
name: "beautiful",
run: async ({ bot, message, global }) => {
const who = message.quoted
const user = message.quoted
? message.quoted.sender
: message.mentionedJid && message.mentionedJid[0]
? message.mentionedJid[0]
: message.fromMe
? bot.user.jid
: message.sender;
const response = await fetch(
`https://strangeapi.hostz.me/api/generators/beautiful?image=${encodeURIComponent(await bot.profilePictureUrl(who).catch(() => "https://w7.pngwing.com/pngs/717/24/png-transparent-computer-icons-user-profile-user-account-avatar-heroes-silhouette-black-thumbnail.png"))}}`,
`https://strangeapi.hostz.me/api/generators/beautiful?image=${encodeURIComponent(await bot.profilePictureUrl(user).catch(() => "https://w7.pngwing.com/pngs/717/24/png-transparent-computer-icons-user-profile-user-account-avatar-heroes-silhouette-black-thumbnail.png"))}}`,
{
headers: {
Authorization: `Bearer ${global.imageToken}`,
Expand Down
4 changes: 2 additions & 2 deletions src/commands/images/bed.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@ const { sticker } = require("../../lib/sticker");
module.exports = {
name: "bed",
run: async ({ bot, message, global }) => {
const who = message.quoted
const user = message.quoted
? message.quoted.sender
: message.mentionedJid && message.mentionedJid[0]
? message.mentionedJid[0]
: message.fromMe
? bot.user.jid
: message.sender;
const response = await fetch(
`https://strangeapi.hostz.me/api/generators/bed?image1=${encodeURIComponent(await bot.profilePictureUrl(message.sender ?? message.quoted.sender).catch(() => "https://w7.pngwing.com/pngs/717/24/png-transparent-computer-icons-user-profile-user-account-avatar-heroes-silhouette-black-thumbnail.png"))}&image2=${encodeURIComponent(await bot.profilePictureUrl(who).catch(() => "https://w7.pngwing.com/pngs/717/24/png-transparent-computer-icons-user-profile-user-account-avatar-heroes-silhouette-black-thumbnail.png"))}`,
`https://strangeapi.hostz.me/api/generators/bed?image1=${encodeURIComponent(await bot.profilePictureUrl(message.sender ?? message.quoted.sender).catch(() => "https://w7.pngwing.com/pngs/717/24/png-transparent-computer-icons-user-profile-user-account-avatar-heroes-silhouette-black-thumbnail.png"))}&image2=${encodeURIComponent(await bot.profilePictureUrl(user).catch(() => "https://w7.pngwing.com/pngs/717/24/png-transparent-computer-icons-user-profile-user-account-avatar-heroes-silhouette-black-thumbnail.png"))}`,
{
headers: {
Authorization: `Bearer ${global.imageToken}`,
Expand Down
4 changes: 2 additions & 2 deletions src/commands/images/blur.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@ const { sticker } = require("../../lib/sticker");
module.exports = {
name: "blur",
run: async ({ bot, message, global }) => {
const who = message.quoted
const user = message.quoted
? message.quoted.sender
: message.mentionedJid && message.mentionedJid[0]
? message.mentionedJid[0]
: message.fromMe
? bot.user.jid
: message.sender;
const response = await fetch(
`https://strangeapi.hostz.me/api/filters/blur?image=${encodeURIComponent(await bot.profilePictureUrl(who).catch(() => "https://w7.pngwing.com/pngs/717/24/png-transparent-computer-icons-user-profile-user-account-avatar-heroes-silhouette-black-thumbnail.png"))}}`,
`https://strangeapi.hostz.me/api/filters/blur?image=${encodeURIComponent(await bot.profilePictureUrl(user).catch(() => "https://w7.pngwing.com/pngs/717/24/png-transparent-computer-icons-user-profile-user-account-avatar-heroes-silhouette-black-thumbnail.png"))}}`,
{
headers: {
Authorization: `Bearer ${global.imageToken}`,
Expand Down
4 changes: 2 additions & 2 deletions src/commands/images/bobross.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@ const { sticker } = require("../../lib/sticker");
module.exports = {
name: "bobross",
run: async ({ bot, message, global }) => {
const who = message.quoted
const user = message.quoted
? message.quoted.sender
: message.mentionedJid && message.mentionedJid[0]
? message.mentionedJid[0]
: message.fromMe
? bot.user.jid
: message.sender;
const response = await fetch(
`https://strangeapi.hostz.me/api/generators/bobross?image=${encodeURIComponent(await bot.profilePictureUrl(who).catch(() => "https://w7.pngwing.com/pngs/717/24/png-transparent-computer-icons-user-profile-user-account-avatar-heroes-silhouette-black-thumbnail.png"))}}`,
`https://strangeapi.hostz.me/api/generators/bobross?image=${encodeURIComponent(await bot.profilePictureUrl(user).catch(() => "https://w7.pngwing.com/pngs/717/24/png-transparent-computer-icons-user-profile-user-account-avatar-heroes-silhouette-black-thumbnail.png"))}}`,
{
headers: {
Authorization: `Bearer ${global.imageToken}`,
Expand Down
4 changes: 2 additions & 2 deletions src/commands/images/circle.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@ const { sticker } = require("../../lib/sticker");
module.exports = {
name: "circle",
run: async ({ bot, message, global }) => {
const who = message.quoted
const user = message.quoted
? message.quoted.sender
: message.mentionedJid && message.mentionedJid[0]
? message.mentionedJid[0]
: message.fromMe
? bot.user.jid
: message.sender;
const response = await fetch(
`https://strangeapi.hostz.me/api/utils/circle?image=${encodeURIComponent(await bot.profilePictureUrl(who).catch(() => "https://w7.pngwing.com/pngs/717/24/png-transparent-computer-icons-user-profile-user-account-avatar-heroes-silhouette-black-thumbnail.png"))}}`,
`https://strangeapi.hostz.me/api/utils/circle?image=${encodeURIComponent(await bot.profilePictureUrl(user).catch(() => "https://w7.pngwing.com/pngs/717/24/png-transparent-computer-icons-user-profile-user-account-avatar-heroes-silhouette-black-thumbnail.png"))}}`,
{
headers: {
Authorization: `Bearer ${global.imageToken}`,
Expand Down
4 changes: 2 additions & 2 deletions src/commands/images/clown.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@ const { sticker } = require("../../lib/sticker");
module.exports = {
name: "clown",
run: async ({ bot, message, global }) => {
const who = message.quoted
const user = message.quoted
? message.quoted.sender
: message.mentionedJid && message.mentionedJid[0]
? message.mentionedJid[0]
: message.fromMe
? bot.user.jid
: message.sender;
const response = await fetch(
`https://strangeapi.hostz.me/api/generators/clown?image=${encodeURIComponent(await bot.profilePictureUrl(who).catch(() => "https://w7.pngwing.com/pngs/717/24/png-transparent-computer-icons-user-profile-user-account-avatar-heroes-silhouette-black-thumbnail.png"))}}`,
`https://strangeapi.hostz.me/api/generators/clown?image=${encodeURIComponent(await bot.profilePictureUrl(user).catch(() => "https://w7.pngwing.com/pngs/717/24/png-transparent-computer-icons-user-profile-user-account-avatar-heroes-silhouette-black-thumbnail.png"))}}`,
{
headers: {
Authorization: `Bearer ${global.imageToken}`,
Expand Down
4 changes: 2 additions & 2 deletions src/commands/images/delete.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@ const { sticker } = require("../../lib/sticker");
module.exports = {
name: "delete",
run: async ({ bot, message, global }) => {
const who = message.quoted
const user = message.quoted
? message.quoted.sender
: message.mentionedJid && message.mentionedJid[0]
? message.mentionedJid[0]
: message.fromMe
? bot.user.jid
: message.sender;
const response = await fetch(
`https://strangeapi.hostz.me/api/generators/delete?image=${encodeURIComponent(await bot.profilePictureUrl(who).catch(() => "https://w7.pngwing.com/pngs/717/24/png-transparent-computer-icons-user-profile-user-account-avatar-heroes-silhouette-black-thumbnail.png"))}}`,
`https://strangeapi.hostz.me/api/generators/delete?image=${encodeURIComponent(await bot.profilePictureUrl(user).catch(() => "https://w7.pngwing.com/pngs/717/24/png-transparent-computer-icons-user-profile-user-account-avatar-heroes-silhouette-black-thumbnail.png"))}}`,
{
headers: {
Authorization: `Bearer ${global.imageToken}`,
Expand Down
4 changes: 2 additions & 2 deletions src/commands/images/dexter.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@ const { sticker } = require("../../lib/sticker");
module.exports = {
name: "dexter",
run: async ({ bot, message, global }) => {
const who = message.quoted
const user = message.quoted
? message.quoted.sender
: message.mentionedJid && message.mentionedJid[0]
? message.mentionedJid[0]
: message.fromMe
? bot.user.jid
: message.sender;
const response = await fetch(
`https://strangeapi.hostz.me/api/generators/dexter?image=${encodeURIComponent(await bot.profilePictureUrl(who).catch(() => "https://w7.pngwing.com/pngs/717/24/png-transparent-computer-icons-user-profile-user-account-avatar-heroes-silhouette-black-thumbnail.png"))}}`,
`https://strangeapi.hostz.me/api/generators/dexter?image=${encodeURIComponent(await bot.profilePictureUrl(user).catch(() => "https://w7.pngwing.com/pngs/717/24/png-transparent-computer-icons-user-profile-user-account-avatar-heroes-silhouette-black-thumbnail.png"))}}`,
{
headers: {
Authorization: `Bearer ${global.imageToken}`,
Expand Down
4 changes: 2 additions & 2 deletions src/commands/images/facepalm.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@ const { sticker } = require("../../lib/sticker");
module.exports = {
name: "facepalm",
run: async ({ bot, message, global }) => {
const who = message.quoted
const user = message.quoted
? message.quoted.sender
: message.mentionedJid && message.mentionedJid[0]
? message.mentionedJid[0]
: message.fromMe
? bot.user.jid
: message.sender;
const response = await fetch(
`https://strangeapi.hostz.me/api/generators/facepalm?image=${encodeURIComponent(await bot.profilePictureUrl(who).catch(() => "https://w7.pngwing.com/pngs/717/24/png-transparent-computer-icons-user-profile-user-account-avatar-heroes-silhouette-black-thumbnail.png"))}}`,
`https://strangeapi.hostz.me/api/generators/facepalm?image=${encodeURIComponent(await bot.profilePictureUrl(user).catch(() => "https://w7.pngwing.com/pngs/717/24/png-transparent-computer-icons-user-profile-user-account-avatar-heroes-silhouette-black-thumbnail.png"))}}`,
{
headers: {
Authorization: `Bearer ${global.imageToken}`,
Expand Down
4 changes: 2 additions & 2 deletions src/commands/images/invert.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@ const { sticker } = require("../../lib/sticker");
module.exports = {
name: "invert",
run: async ({ bot, message, global }) => {
const who = message.quoted
const user = message.quoted
? message.quoted.sender
: message.mentionedJid && message.mentionedJid[0]
? message.mentionedJid[0]
: message.fromMe
? bot.user.jid
: message.sender;
const response = await fetch(
`https://strangeapi.hostz.me/api/filters/invert?image=${encodeURIComponent(await bot.profilePictureUrl(who).catch(() => "https://w7.pngwing.com/pngs/717/24/png-transparent-computer-icons-user-profile-user-account-avatar-heroes-silhouette-black-thumbnail.png"))}}`,
`https://strangeapi.hostz.me/api/filters/invert?image=${encodeURIComponent(await bot.profilePictureUrl(user).catch(() => "https://w7.pngwing.com/pngs/717/24/png-transparent-computer-icons-user-profile-user-account-avatar-heroes-silhouette-black-thumbnail.png"))}}`,
{
headers: {
Authorization: `Bearer ${global.imageToken}`,
Expand Down
4 changes: 2 additions & 2 deletions src/commands/images/rejected.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@ const { sticker } = require("../../lib/sticker");
module.exports = {
name: "rejected",
run: async ({ bot, message, global }) => {
const who = message.quoted
const user = message.quoted
? message.quoted.sender
: message.mentionedJid && message.mentionedJid[0]
? message.mentionedJid[0]
: message.fromMe
? bot.user.jid
: message.sender;
const response = await fetch(
`https://strangeapi.hostz.me/api/overlays/rejected?image=${encodeURIComponent(await bot.profilePictureUrl(who).catch(() => "https://w7.pngwing.com/pngs/717/24/png-transparent-computer-icons-user-profile-user-account-avatar-heroes-silhouette-black-thumbnail.png"))}}`,
`https://strangeapi.hostz.me/api/overlays/rejected?image=${encodeURIComponent(await bot.profilePictureUrl(user).catch(() => "https://w7.pngwing.com/pngs/717/24/png-transparent-computer-icons-user-profile-user-account-avatar-heroes-silhouette-black-thumbnail.png"))}}`,
{
headers: {
Authorization: `Bearer ${global.imageToken}`,
Expand Down
4 changes: 2 additions & 2 deletions src/commands/images/wanted.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@ const { sticker } = require("../../lib/sticker");
module.exports = {
name: "wanted",
run: async ({ bot, message, global }) => {
const who = message.quoted
const user = message.quoted
? message.quoted.sender
: message.mentionedJid && message.mentionedJid[0]
? message.mentionedJid[0]
: message.fromMe
? bot.user.jid
: message.sender;
const response = await fetch(
`https://strangeapi.hostz.me/api/generators/wanted?image=${encodeURIComponent(await bot.profilePictureUrl(who).catch(() => "https://w7.pngwing.com/pngs/717/24/png-transparent-computer-icons-user-profile-user-account-avatar-heroes-silhouette-black-thumbnail.png"))}}`,
`https://strangeapi.hostz.me/api/generators/wanted?image=${encodeURIComponent(await bot.profilePictureUrl(user).catch(() => "https://w7.pngwing.com/pngs/717/24/png-transparent-computer-icons-user-profile-user-account-avatar-heroes-silhouette-black-thumbnail.png"))}}`,
{
headers: {
Authorization: `Bearer ${global.imageToken}`,
Expand Down
Loading

0 comments on commit 9994ed0

Please sign in to comment.