Skip to content

Commit 2ff6e34

Browse files
committed
Added !clearlocalstorage command
1 parent de768ae commit 2ff6e34

1 file changed

Lines changed: 19 additions & 5 deletions

File tree

basicBot.js

Lines changed: 19 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@
236236
var botCreatorIDs = ["3851534", "4105209"];
237237

238238
var basicBot = {
239-
version: "2.8.17",
239+
version: "2.9.17",
240240
status: false,
241241
name: "basicBot",
242242
loggedInID: null,
@@ -1884,15 +1884,16 @@
18841884
}
18851885
},
18861886

1887-
commandsCommand: {
1888-
command: 'commands',
1889-
rank: 'user',
1887+
clearlocalstorageCommand: {
1888+
command: 'clearlocalstorage',
1889+
rank: 'manager',
18901890
type: 'exact',
18911891
functionality: function (chat, cmd) {
18921892
if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0);
18931893
if (!basicBot.commands.executable(this.rank, chat)) return void (0);
18941894
else {
1895-
API.sendChat(subChat(basicBot.chat.commandslink, {botname: basicBot.settings.botName, link: basicBot.cmdLink}));
1895+
localStorage.clear();
1896+
API.chatLog('Cleared localstorage, please refresh the page!');
18961897
}
18971898
}
18981899
},
@@ -1917,6 +1918,19 @@
19171918
}
19181919
},
19191920

1921+
commandsCommand: {
1922+
command: 'commands',
1923+
rank: 'user',
1924+
type: 'exact',
1925+
functionality: function (chat, cmd) {
1926+
if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0);
1927+
if (!basicBot.commands.executable(this.rank, chat)) return void (0);
1928+
else {
1929+
API.sendChat(subChat(basicBot.chat.commandslink, {botname: basicBot.settings.botName, link: basicBot.cmdLink}));
1930+
}
1931+
}
1932+
},
1933+
19201934
cookieCommand: {
19211935
command: 'cookie',
19221936
rank: 'user',

0 commit comments

Comments
 (0)