Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var InformIfNewItem = function() {
- let Response = axios.get(getreq);
- Response.then(function(result) {
- oldarray = result.data;
- });
- for (let s of newarray) {
- checkmodecycle(s);
- const yourchannel = client.channels.find(
- channel => channel.name === "bot-announcements"
- );
- const yourchannel2 = client.channels.find(
- channel => channel.name === "general"
- );
- if (finditemfromoldarray(s.Name) == false) {
- if (mode == "newitem") {
- if (yourchannel != null) {
- yourchannel.send({
- embed: {
- color: 3447003,
- author: {
- name: client.user.username,
- icon_url: client.user.avatarURL
- },
- title: "New item released: " + s.Name,
- url: s.AbsoluteUrl,
- description: s.Description,
- fields: [
- {
- name: "Price",
- value: s.Price + " Robux"
- },
- {
- name: "IsLimited",
- value: s.IsLimited
- },
- {
- name: "Sales",
- value: s.Sales
- },
- {
- name: "Favorties",
- value: s.Favorited
- },
- {
- name: "Last Updated",
- value: s.Updated
- },
- {
- name: "Creator",
- value: s.Creator
- }
- ],
- timestamp: new Date(),
- footer: {
- icon_url: client.user.avatarURL,
- text: "Roblox++ V" + BOTID
- }
- }
- });
- } else if (yourchannel2 != null) {
- yourchannel2.send({
- embed: {
- color: 3447003,
- author: {
- name: client.user.username,
- icon_url: client.user.avatarURL
- },
- title: "New item released: " + s.Name,
- url: "https://www.roblox.com/catalog/" + s.AssetId,
- description: s.Description,
- fields: [
- {
- name: "Price",
- value: s.Price + "Robux"
- },
- {
- name: "IsLimited",
- value: s.IsLimited
- },
- {
- name: "Sales",
- value: s.Sales
- },
- {
- name: "Favorties",
- value: s.Favorited
- },
- {
- name: "Last Updated",
- value: s.Updated
- },
- {
- name: "Creator",
- value: s.Creator
- }
- ],
- timestamp: new Date(),
- footer: {
- icon_url: client.user.avatarURL,
- text: "Roblox++ V" + BOTID
- }
- }
- });
- }
- }
- }
- }
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement