Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

new 445 #454

Open
wants to merge 96 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
96 commits
Select commit Hold shift + click to select a range
0b86a01
test
josetrindade1 Sep 26, 2021
2ad0a33
test
josetrindade1 Sep 26, 2021
3caddc5
lol mrredo menus is now mrredo context menu
josetrindade1 Sep 26, 2021
9f43e6c
fix?
josetrindade1 Sep 26, 2021
8502266
updated yarn and package-lock
josetrindade1 Sep 26, 2021
c0b88d2
t
josetrindade1 Sep 26, 2021
c6e0b48
update 454 to be = 456
mrredo-and-josetrindade1 Sep 30, 2021
20ac393
localforage error fixs
mrredo-and-josetrindade1 Sep 30, 2021
5cac8a3
e
mrredo-and-josetrindade1 Oct 1, 2021
00ca3c9
big update in years lol
mrredo-and-josetrindade1 Oct 1, 2021
cbc816e
litle update on event category
mrredo-and-josetrindade1 Oct 1, 2021
67b676f
bug fix
mrredo-and-josetrindade1 Oct 1, 2021
52f767d
bug fix lol
mrredo-and-josetrindade1 Oct 2, 2021
3673629
bug fix
mrredo-and-josetrindade1 Oct 2, 2021
b08bbe4
nothing
mrredo-and-josetrindade1 Oct 3, 2021
d425fc7
not that big update
mrredo-and-josetrindade1 Oct 3, 2021
c45a721
fixs
mrredo-and-josetrindade1 Oct 3, 2021
f97f9d8
nothing.... :(
mrredo-and-josetrindade1 Oct 5, 2021
05463d5
fix
mrredo-and-josetrindade1 Oct 5, 2021
03720df
get role fix(maybe it will be bug but dc)
mrredo-and-josetrindade1 Oct 5, 2021
a7d93e4
bug fixed some stuffs
mrredo-and-josetrindade1 Oct 5, 2021
fe8f0c5
fix
mrredo-and-josetrindade1 Oct 6, 2021
434407c
added discord image
mrredo-and-josetrindade1 Oct 6, 2021
4524513
fix
mrredo-and-josetrindade1 Oct 8, 2021
46f5b36
fix
mrredo-and-josetrindade1 Oct 8, 2021
de9bb2b
no need for this file!
mrredo-and-josetrindade1 Oct 8, 2021
4e3e58c
no need for this file
mrredo-and-josetrindade1 Oct 8, 2021
ea99705
imports updated
mrredo-and-josetrindade1 Oct 8, 2021
75991c2
no need for this file
mrredo-and-josetrindade1 Oct 8, 2021
aa530d2
no need for this file
mrredo-and-josetrindade1 Oct 8, 2021
f9da26d
no need for this file
mrredo-and-josetrindade1 Oct 8, 2021
8139238
no need for this file
mrredo-and-josetrindade1 Oct 8, 2021
96c6625
no need for this file
mrredo-and-josetrindade1 Oct 8, 2021
800544b
no need for this file
mrredo-and-josetrindade1 Oct 8, 2021
770048c
Update toolbox.js
mrredo-and-josetrindade1 Oct 8, 2021
1859aca
Update toolbox.js
mrredo-and-josetrindade1 Oct 8, 2021
494ad7b
Update context_m.js
mrredo-and-josetrindade1 Oct 8, 2021
121a233
Update context_m.js
mrredo-and-josetrindade1 Oct 8, 2021
ad963a8
Create context_m_g.js
mrredo-and-josetrindade1 Oct 8, 2021
c5d1dea
Update index.js
mrredo-and-josetrindade1 Oct 8, 2021
bc6cf96
Update toolbox.js
mrredo-and-josetrindade1 Oct 8, 2021
5e7b28f
new update
mrredo-and-josetrindade1 Oct 10, 2021
d6eb20f
bug fix
mrredo-and-josetrindade1 Oct 10, 2021
b797847
bug fix
mrredo-and-josetrindade1 Oct 10, 2021
7c5d857
fix
mrredo-and-josetrindade1 Oct 10, 2021
78a5f1e
trying to fix this
mrredo-and-josetrindade1 Oct 10, 2021
4e2a97c
trying to fix another bug :|||
mrredo-and-josetrindade1 Oct 10, 2021
5a16a2a
fixed finally
mrredo-and-josetrindade1 Oct 10, 2021
095c9e0
added anti crash code
mrredo-and-josetrindade1 Oct 10, 2021
0529a17
fixed anti crash
mrredo-and-josetrindade1 Oct 10, 2021
b27ebbc
fix anti crash
mrredo-and-josetrindade1 Oct 10, 2021
ad649c6
fixed together bug
mrredo-and-josetrindade1 Oct 12, 2021
04a9625
updated giveaways
mrredo-and-josetrindade1 Oct 12, 2021
14a88d7
added copy button
mrredo-and-josetrindade1 Oct 12, 2021
475622b
fixed content: error
mrredo-and-josetrindade1 Oct 12, 2021
ec32832
added token idk
mrredo-and-josetrindade1 Oct 13, 2021
a3cb5eb
added pre build
mrredo-and-josetrindade1 Oct 14, 2021
7ccf86f
fixed together wrong speling
mrredo-and-josetrindade1 Oct 14, 2021
43afdb4
fixed somes events not having async
mrredo-and-josetrindade1 Oct 14, 2021
99dd3ec
fixed cancel translation
mrredo-and-josetrindade1 Oct 14, 2021
aa653d5
fixed .user error probaly
mrredo-and-josetrindade1 Oct 16, 2021
d82899b
added sort
mrredo-and-josetrindade1 Oct 16, 2021
53010cc
updated font and icon color
mrredo-and-josetrindade1 Oct 16, 2021
79525e3
update
mrredo-and-josetrindade1 Oct 16, 2021
7e80069
fixed has permission bug
mrredo-and-josetrindade1 Oct 16, 2021
ec3e76f
added favorite
mrredo-and-josetrindade1 Oct 17, 2021
054c38f
changed style
mrredo-and-josetrindade1 Oct 17, 2021
7c3dae2
fixed wait reply prob
mrredo-and-josetrindade1 Oct 17, 2021
dbd0d28
ops mistake
mrredo-and-josetrindade1 Oct 17, 2021
a2566df
added ends with
mrredo-and-josetrindade1 Oct 17, 2021
3cb57db
added more stuffs to answer and added attachment stuffs
mrredo-and-josetrindade1 Oct 18, 2021
f2a6ebb
fixed attachment
mrredo-and-josetrindade1 Oct 18, 2021
ec46290
added a way to hide and show toolbox
mrredo-and-josetrindade1 Oct 24, 2021
4c55c0f
added removed from server
mrredo-and-josetrindade1 Oct 24, 2021
0ddb8b9
fixed backup
mrredo-and-josetrindade1 Oct 25, 2021
4bec8d8
fixed backup again
mrredo-and-josetrindade1 Oct 25, 2021
1b6ff44
fixed max listerner error
mrredo-and-josetrindade1 Oct 26, 2021
24cf6c7
fixed max listerner error
mrredo-and-josetrindade1 Oct 26, 2021
b70663f
added blur rance
mrredo-and-josetrindade1 Oct 26, 2021
55c4eff
Update send_embed_string.js
mrredo-and-josetrindade1 Oct 27, 2021
32d08eb
added clear ghost blocks
mrredo-and-josetrindade1 Oct 27, 2021
cfbc8de
just a small update
mrredo-and-josetrindade1 Oct 27, 2021
ec06399
added disbaling a button
mrredo-and-josetrindade1 Oct 30, 2021
7da645a
Update en-US.json
mrredo-and-josetrindade1 Oct 30, 2021
4939962
added a check to see if the module that is in the code is really needed
mrredo-and-josetrindade1 Oct 30, 2021
f91b4ca
added a check to see if the module that is in the code is really needed
mrredo-and-josetrindade1 Oct 30, 2021
6e81072
Merge branch 'test' of https://github.com/mrredo-and-josetrindade1/sc…
mrredo-and-josetrindade1 Oct 30, 2021
453ec75
added new stuffs
mrredo-and-josetrindade1 Nov 4, 2021
ea3ed77
added vocie channel + fix 454 package.json error
mrredo-and-josetrindade1 Nov 28, 2021
ef4029b
cmd handler
mrredo-and-josetrindade1 Nov 28, 2021
d99ba3c
updated regex better lmao
mrredo-and-josetrindade1 Nov 28, 2021
c878c31
quick update
mrredo-and-josetrindade1 Nov 28, 2021
d837485
permission block
mrredo-and-josetrindade1 Nov 28, 2021
4abda97
another smoll updatye
mrredo-and-josetrindade1 Nov 28, 2021
986a0c7
added option to disable cmd handler :)
mrredo-and-josetrindade1 Dec 12, 2021
1867b6c
NEW YEAR UPDATE!
mrredo-and-josetrindade1 Dec 31, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v12.16.1
v16.10.0
1 change: 1 addition & 0 deletions .replit
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
run="npm run start"
34,844 changes: 34,844 additions & 0 deletions package-lock.json

Large diffs are not rendered by default.

47 changes: 42 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,21 +11,40 @@
"lint": "vue-cli-service lint"
},
"dependencies": {
"@blockly/block-test": "^1.1.5",
"@blockly/continuous-toolbox": "^1.0.18",
"@blockly/field-grid-dropdown": "^1.0.25",
"@blockly/field-slider": "^2.1.29",
"@blockly/theme-dark": "^2.0.6",
"@blockly/theme-modern": "^2.1.10",
"@blockly/workspace-backpack": "^1.0.9",
"@fortawesome/fontawesome-svg-core": "^1.2.34",
"@fortawesome/free-solid-svg-icons": "^5.15.2",
"@fortawesome/vue-fontawesome": "^2.0.2",
"blockly": "^4.20201217.0",
"@sweetalert2/theme-dark": "^5.0.5",
"blockly": "^6.20210701.0",
"bootstrap": "^4.6.0",
"bootstrap-vue": "^2.21.2",
"easy-json-database-browser": "^2.1.0",
"fs": "^0.0.1-security",
"js-beautify": "^1.13.5",
"jszip": "^3.6.0",
"sweetalert2": "^10.15.5",
"vue": "^2.6.12",
"localforage": "^1.10.0",
"node": "^16.10.0",
"npm": "^7.24.1",
"promises": "^0.2.5",
"sass-loader": "^10",
"save-svg-as-png": "^1.4.17",
"sweetalert2": "^10.16.9",
"vm2": "^3.9.3",
"vue": "^2.6.11",
"vue-i18n": "^8.24.0",
"vue-loader": "^15.9.8",
"vue-swal": "^1.0.0",
"vue-switches": "^2.0.1",
"vue-template-compiler": "^2.6.11",
"vue-toast-notification": "^0.6.1",
"vue-toggle-btn": "^0.1.2",
"vue-tour": "^1.5.0",
"vuex": "^3.6.2"
},
Expand All @@ -38,7 +57,10 @@
"babel-eslint": "^10.1.0",
"eslint": "^7.21.0",
"eslint-plugin-vue": "^7.7.0",
"vue-template-compiler": "^2.6.12"
"events": "^3.3.0",
"sass": "^1.42.1",
"sass-loader": "^12.1.0",
"webpack": "^4.0.0"
},
"eslintConfig": {
"root": true,
Expand All @@ -62,5 +84,20 @@
"browserslist": [
"> 1%",
"last 2 versions"
]
],
"description": "🐱 Make your Discord bot using Scratch blocks! [Scratch For Discord](https://scratch-for-discord.netlify.com) is an advanced fork of [discord-blocks](https://discordblocks.leondrolio.com/). Thanks to [7coil](https://github.com/7coil) for their great work!",
"main": "babel.config.js",
"directories": {
"example": "examples"
},
"repository": {
"type": "git",
"url": "git+https://github.com/mrredo-and-josetrindade1/scratch-for-discord.git"
},
"author": "",
"license": "ISC",
"bugs": {
"url": "https://github.com/mrredo-and-josetrindade1/scratch-for-discord/issues"
},
"homepage": "https://github.com/mrredo-and-josetrindade1/scratch-for-discord#readme"
}
53 changes: 51 additions & 2 deletions public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,63 @@
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<link rel="icon" href="<%= BASE_URL %>scratch.png">
<link rel="icon" href="https://raw.githubusercontent.com/josetrindade1/scratch-for-discord/djs13/public/scratch.png">
<title>Scratch For Discord - Make your own bot using blocks</title>
<meta name="description" content="Make your own discord bot in 5 minutes using blocks with no coding required. Try your bot online and export it on your computer or server." />
<meta name="keywords" content="discord, bot, no-coding, scratch, blocks" />
<meta name="author" content="Androz2091" />
<meta name="author" content="Androz2091" />
<meta name="theme-color" content="#f6bc34" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">

<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Josefin+Sans:wght@600&family=Lato:wght@900&family=Oswald&family=Roboto+Slab&display=swap" rel="stylesheet">

<meta name="google-site-verification" content="cpALYx5PHSXOgLtp-1pxqyELC6zIekO0RDQnWmFvhXI" />
<style>
.blocklyTreeSeparator {
border-bottom: solid #343434 1px;
height: 0;
margin: 5px 0;
}
.blocklyTreeIcon {
filter: invert(100%) sepia(0%) saturate(2950%) hue-rotate(348deg) brightness(118%) contrast(96%) !important;
}
#blocklyTreeIcon {
filter: invert(100%) sepia(0%) saturate(2950%) hue-rotate(348deg) brightness(118%) contrast(96%) !important;
}
.blocklyTreeIconClosed {
filter: invert(100%) sepia(0%) saturate(2950%) hue-rotate(348deg) brightness(118%) contrast(96%)!important;
}
#blocklyTreeIconClosed {
filter: invert(100%) sepia(0%) saturate(2950%) hue-rotate(348deg) brightness(118%) contrast(96%) !important;
}

.customIcon {
color: yellow;
}
/* Makes our label white. */
.blocklyTreeLabel {
color: white;
}
/* Adds padding around the group of categories and separators. */
.blocklyToolboxContents {
padding: 3px;
}
/* Adds space between the categories, rounds the corners and adds space around the label. */
.blocklyTreeRow {
padding: 0px;
margin-bottom: 3px;
border-radius: 4px;
}
.bt {
border-bottom: solid #343434 1px;
height: 0;
margin: 5px 0;
}
body{
font-family: 'lato', sans-serif;
}
::-webkit-scrollbar {
width: 1px;
height: 1px;
Expand Down
97 changes: 92 additions & 5 deletions src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -12,26 +12,106 @@ import Blockly from "blockly";
import NavBarComponent from "./components/NavigationBar/NavigationBar.vue";
import BlocklyComponent from "./components/BlocklyComponent.vue";




Blockly.Tooltip.HOVER_MS = 100;

// Load blocks

import "./blocks/discord/base/";
import "./blocks/discord/message-event/";
import "./blocks/discord/join-event/";
import "./blocks/discord/leave-event/";
import "./blocks/discord/reaction-event/";
import "./blocks/discord/bot-event";

import "./blocks/discord/channels/";
import "./blocks/discord/servers/";
import "./blocks/discord/roles/";
import "./blocks/discord/members/";
import "./blocks/discord/deleted/";
import "./blocks/discord/discord-button/";
import "./blocks/discord/webhook/";
import "./blocks/discord/embed/";
import "./blocks/discord/discord-menu/";
import "./blocks/discord/music/";
import "./blocks/discord/discord-canvas/welcome/";
import "./blocks/discord/discord-canvas/goodbye/";
import "./blocks/discord/discord-canvas/rankcard/";
import "./blocks/discord/discord-backup/";
import "./blocks/discord/discord-giveaway/";
import "./blocks/youtube-notifier/";
import "./blocks/image-generation/";
import "./blocks/discord-image/";
import "./blocks/invite-tracker/";
import "./blocks/cooldown/";
import "./blocks/together/";
import "./blocks/discord/attachment/";
import "./blocks/discord/bot-event-2/";
import "./blocks/date/";
import "./blocks/regex/";
import "./blocks/list/";
import "./blocks/firebase/";
import "./blocks/discord/voice-channel/";
import "./blocks/progess-bar/";
import "./blocks/captcha/";
import "./blocks/pagination/";
//my events
//channel
import "./blocks/logs-events/channel/channel-permissions-update/";
import "./blocks/logs-events/channel/channel-topic-update/";
//member
import "./blocks/logs-events/member/member_boosted/";
import "./blocks/logs-events/member/member_unboosted/";
import "./blocks/logs-events/member/role_add/";
import "./blocks/logs-events/member/role_remove/";
//server
import "./blocks/logs-events/guild/boost_level_up/";
import "./blocks/logs-events/guild/boost_level_down/";
import "./blocks/logs-events/guild/guild_banner_add/";
import "./blocks/logs-events/guild/vanity_url_add/";
import "./blocks/logs-events/guild/vanity_url_remove/";
import "./blocks/logs-events/guild/vanity_url_update/";
//finish of my events

//handler
import "./blocks/discord/handler/normal_cmd_handler";

import "./blocks/discord/mmenu/";
import "./blocks/discord/mbuttons/";
import "./blocks/discord/membed/";
import "./blocks/discord/m-register-menus/";
import "./blocks/discord/mslash/";
import "./blocks/discord/wmise/";
import "./blocks/mongodb/";

import "./blocks/jsonrequest";
import "./blocks/database/";
import "./blocks/text/";
import "./blocks/loops/";
import "./blocks/other/";
import "./prompt";
//events
//channel
import "./blocks/events/channel/channelCreate/";
import "./blocks/events/channel/channelUpdate/";
import "./blocks/events/channel/channelDelete/";
//emoji
import "./blocks/events/emoji/emojiCreate/";
import "./blocks/events/emoji/emojiUpdate/";
import "./blocks/events/emoji/emojiDelete/";
//member
import "./blocks/events/member/join-event/";
import "./blocks/events/member/leave-event/";
import "./blocks/events/member/guildBanAdd/";
import "./blocks/events/member/guildBanRemove/";
//role
import "./blocks/events/role/roleCreate/";
import "./blocks/events/role/roleUpdate/";
import "./blocks/events/role/roleDelete/";
//sticker
import "./blocks/events/sticker/stickerCreate/";
import "./blocks/events/sticker/stickerUpdate/";
import "./blocks/events/sticker/stickerDelete/";

import Theme from '@blockly/theme-modern';

Expand Down Expand Up @@ -78,6 +158,13 @@ export default {
scaleSpeed: 1.2
}
},
move:{
scrollbars: {
horizontal: true,
vertical: true
},
drag: true,
wheel: true},
vueTourOptions: {
labels: {
buttonSkip: this.$t('tour.skip'),
Expand Down Expand Up @@ -117,12 +204,12 @@ export default {

<style>
#app {
font-family: "Avenir", Helvetica, Arial, sans-serif;
font-family: "Oswald", sans-serif;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
color: #2c3e50;
}

#blocklySpace {
position: absolute;
width: 100%;
Expand All @@ -136,4 +223,4 @@ export default {
.testopa {
opacity: 0.1;
}
</style>
</style>
17 changes: 17 additions & 0 deletions src/backpack-save-load.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import localforage from "localforage";
export default async function Load(backpack){
console.log('started backpack')
const content = await localforage.getItem("backpack3");
if(content !== null){
console.log('loading backpack')
backpack.setContents(content)
}
Save(backpack)
}
async function Save(backpack){
setInterval(async function(){
console.log('saving backpack')
localforage.setItem("backpack3",backpack.getContents());

}, 1000);
}
24 changes: 24 additions & 0 deletions src/blocks/captcha/captcha_image.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
import Blockly from "blockly/core";

const blockName = "captcha_image";

const blockData = {
"message0": "Captcha Image",
"args0": [
],
"colour": "#187795",
"output": "Captcha",
"tooltip": "",
"helpUrl": ""
};

Blockly.Blocks[blockName] = {
init: function() {
this.jsonInit(blockData);
}
};

Blockly.JavaScript[blockName] = function() {
const code = [`new Discord.MessageAttachment(captcha.JPEGStream, "captcha.jpeg") `, Blockly.JavaScript.ORDER_NONE];
return code;
};
24 changes: 24 additions & 0 deletions src/blocks/captcha/captcha_value.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
import Blockly from "blockly/core";

const blockName = "captcha_value";

const blockData = {
"message0": "Captcha Value",
"args0": [
],
"colour": "#187795",
"output": "String",
"tooltip": "",
"helpUrl": ""
};

Blockly.Blocks[blockName] = {
init: function() {
this.jsonInit(blockData);
}
};

Blockly.JavaScript[blockName] = function() {
const code = [`captcha.value`, Blockly.JavaScript.ORDER_NONE];
return code;
};
25 changes: 25 additions & 0 deletions src/blocks/captcha/create_new_captcha.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
import Blockly from "blockly/core";

const blockName = "create_captcha";

const blockData = {
"message0": "Create New Captcha",
"args0": [
],
"colour": "#4C97FF",
"previousStatement": null,
"nextStatement": null,
"tooltip": "",
"helpUrl": ""
};

Blockly.Blocks[blockName] = {
init: function() {
this.jsonInit(blockData);
}
};

Blockly.JavaScript[blockName] = function() {
const code = `let captcha = new Captcha()\n`
return code;
};
4 changes: 4 additions & 0 deletions src/blocks/captcha/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
import "./create_new_captcha";
import "./captcha_image";
import "./send_image";
import "./captcha_value";
Loading